-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Nx #3786
Comments
This would be great. I've got nx plugin releasing soon which works but be nice if we can get this in |
@birkskyum Just tried taking these two out and it still appears to be some issue. |
Just an update: It's failing on generator function with --bun
It will never go pass |
Ok, SO main thing is IPC however, I have a custom task runner that will resolve this as long as #3790 is stubbed as NX doesn't actually need to return |
@birkskyum Not finished yet but has bun create and run support https://www.npmjs.com/package/@nx-bun/nx |
@Jordan-Hall , IPC was introduced by #4468 |
Thank you @birkskyum I'll give it a checkout either today or tomorrow to update it. Thays a huge change thank you |
Just seen the website, can't wait. This has been on the most wanted list for about a year. |
https://github.com/Jordan-Hall/nx-bun-template Fully working version with NX just in bun and Bun package manager uses patch and fixes event loop. @birkskyum just event loop issue for nx now #5403 Then this is fully suportted from bun side |
I think the event loop issue has been resolved over at Bun, does that mean we can just use Bun without the template? |
That no longer uses fix for event loop. It also has a fix to use Bun as package manager... butbyes you can they issue do not use nx/js:tcs Still better to use @nx-bun/Bun plugin as it has Bun compiler and run built in |
okay, so all we need to do is install the nx-bun/Bun plugin? |
Yes it has all the generators and executors based on bun. |
@nektro , amazing - i can confirm the There is a bit more work to do though as ➜ bun --bun run build
$ nx build
> nx run test2:build:production
vite v5.0.11 building for production...
Could not find 'nx' module in this workspace. 29 | const onlyStdout = [];
30 | process.stdout._write = (chunk, encoding, callback) => {
31 | onlyStdout.push(chunk);
32 | (0, fs_1.appendFileSync)(stdoutAndStderrLogFileHandle, chunk);
33 | if (streamOutput) {
34 | stdoutWrite.apply(process.stdout, [chunk, encoding, callback]);
^
TypeError: undefined is not an object (evaluating 'stdoutWrite.apply')
at /Users/admin/repos/bun-kitchensink/test2/node_modules/nx/bin/run-executor.js:34:13
at writeToStdOut (/Users/admin/repos/bun-kitchensink/test2/node_modules/nx/src/utils/output.js:48:9)
at addNewline (/Users/admin/repos/bun-kitchensink/test2/node_modules/nx/src/utils/output.js:79:9)
at error (/Users/admin/repos/bun-kitchensink/test2/node_modules/nx/src/utils/output.js:96:9)
at /Users/admin/repos/bun-kitchensink/test2/node_modules/nx/src/utils/params.js:22:13
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Ran target build for project test2 (887ms)
✖ 1/1 failed
✔ 0/1 succeeded [0 read from cache]
error: script "build" exited with code 1
|
Hmm, with latest canary ➜ bun --bun run start
$ nx serve
➜ bun --bun run build
$ nx build |
Nx - Website - GitHub
What version of Bun is running?
0.7.0
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
bun x create-nx-workspace
bun i
bun --bun run start
What is the expected behavior?
What do you see instead?
Debug log
Additional information
Nx can be ran with many different frameworks (react, angular etc.), bundlers (vite, webpack etc.), with and without workspaces, but a common denominator is that
performance.mark()
is used, which isn't implemented in Bun:The text was updated successfully, but these errors were encountered: