-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 Nuxt (Vite framework for Vue) #3771
Comments
Breaking because child_process.fork() isn't implemented yet |
Tested the latest release ( Also tested |
Awesome, thank you for sharing your findings! Closed by #3851 |
At least in some environments, the Nitro issue with ➜ bun --bun run dev
$ nuxt dev
SyntaxError: Import named 'formatWithOptions' not found in module 'node:util'. |
@danielwaltz , I'm a bit puzzled why this worked for you. Which architecture/os did you use? |
@birkskyum I am on an apple silicon mac (arm64). I'm using the latest non-preview version of macOS (13.4.1 Ventura). For bun, I was using What I suspect could be the case is the project you are referencing is using Nuxt features (like server endpoints or something else) that my smaller projects are not. Because Nuxt is dynamic about its dependencies and what is loaded at runtime based on what is used, my simple projects (both are personal/portfolio sites and one doesn't even use a router) probably have a smaller surface area of required features. I wish I had a larger Nuxt project to test with! If you want to verify that Nuxt can run, feel free to clone my personal site and run EDIT: Also, I think it is worth noting that while Nuxt 3 is by default using Vite behind the scenes, it does still support webpack usage. I would also verify that the project you're using is not configured to use webpack instead just in case! |
I just followed the reproduction steps, but i think you're right the use of a server makes the difference, because the error i get is related to Nitro |
I have quite large NuxtJS project. bun version: 0.7.3
|
@PushUpek , it's caused by this |
it does seem like the server can stay open now, but ➜ bun --bun run build
$ nuxt build
[10:08:34 AM] Nuxi 3.6.5
[10:08:34 AM] WARN Changing NODE_ENV from development to production, to avoid unintended behavior.
[10:08:34 AM] Nuxt 3.6.5 with Nitro 2.5.2
[10:08:35 AM] ℹ Building client...
[10:08:35 AM] ℹ vite v4.3.9 building for development...
[10:08:36 AM] ℹ ✓ 97 modules transformed.
[10:08:36 AM] ℹ .nuxt/dist/client/manifest.json 1.59 kB │ gzip: 0.32 kB
[10:08:36 AM] ℹ .nuxt/dist/client/_nuxt/error-dev.00ee2d03.css 2.26 kB │ gzip: 0.81 kB
[10:08:36 AM] ℹ .nuxt/dist/client/_nuxt/error-404.1da70a4c.css 3.66 kB │ gzip: 1.14 kB
[10:08:36 AM] ℹ .nuxt/dist/client/_nuxt/entry.9ed27021.css 12.44 kB │ gzip: 2.48 kB
[10:08:36 AM] ℹ .nuxt/dist/client/_nuxt/error-dev.4413317b.js 2.41 kB │ gzip: 1.24 kB │ map: 4.53 kB
[10:08:36 AM] ℹ .nuxt/dist/client/_nuxt/error-404.e8b9af35.js 6.90 kB │ gzip: 3.12 kB │ map: 24.41 kB
[10:08:36 AM] ℹ .nuxt/dist/client/_nuxt/entry.1866d780.js 225.83 kB │ gzip: 66.69 kB │ map: 857.85 kB
[10:08:36 AM] ℹ ✓ built in 1.39s
[10:08:36 AM] ✔ Client built in 1392ms
[10:08:36 AM] ℹ Building server...
[10:08:36 AM] ℹ vite v4.3.9 building SSR bundle for development...
[10:08:37 AM] ℹ ✓ 42 modules transformed.
[10:08:37 AM] ℹ .nuxt/dist/server/styles.mjs 0.07 kB
[10:08:37 AM] ℹ .nuxt/dist/server/_nuxt/island-renderer-f70c2cce.js 1.05 kB │ map: 1.41 kB
[10:08:37 AM] ℹ .nuxt/dist/server/_nuxt/error-dev-c6a413fd.js 3.52 kB │ map: 4.60 kB
[10:08:37 AM] ℹ .nuxt/dist/server/_nuxt/error-404-2bdc838f.js 10.23 kB │ map: 19.12 kB
[10:08:37 AM] ℹ .nuxt/dist/server/server.mjs 122.99 kB │ map: 165.13 kB
[10:08:37 AM] ℹ ✓ built in 359ms
[10:08:37 AM] ✔ Server built in 366ms
[10:08:37 AM] ERROR { columns: 47, date: true, colors: false, compact: true } { [SystemError] syscall: 'TODO', errno: -126 }
|
progress on build:
havent taken a look fully at why the process dies on first request |
I would like to report that using Nuxt with Nuxt Content module enabled will cause Nuxt failed to start. I was using Error message
Environment
|
@toto6038 , can you make a small reproduction of this? |
There is a single issue left, that impact both
ERROR Error: Command failed: bun install
The first argument must be a Readable, a ReadableStream, or an async iterable.
ERROR Command failed: npx serve ./public
The first argument must be a Readable, a ReadableStream, or an async iterable.
error: script "preview" exited with code 1 (SIGHUP) |
@birkskyum Sorry for late reply since I was on vacation. Please refer to the minimal reproduction. To see the output from console, you may need to fork the Repl and run it with Run button. |
Testing my project on Nuxt 2 and it doesn't run. I get |
Repro for the issue mentioned by @giorgiopogliani - with consola 2.x, and thus Nuxt 2 as well:
const consola = require('consola')
consola.success('Built!')
consola.info('Reporter: Some info')
consola.error(new Error('Foo')) Each of these three lines gives the error:
|
@giorgiopogliani , nuxt 2 have "consola": "3.2.3" (package.json) - are you on the latest nuxt 2.x? |
I had similar problem like @giorgiopogliani. It seems like pinning concola version to 3.2.3 fix this issue. However, on my product project, i saw this error while building server part. I'm not sure what causes this error:
|
@birkskyum I am on Nuxt 2.15 because I have to stay on Vue 2.6 |
I am also not able to run a Nuxt 3 app using bun I get a generic message about not being able to start nuxt when I run
And I get the following error when I run
It's for a fairly simple static website(repo) with very few
|
Followed the official guide, but \gGot this error today. I'm using Apple Silicon. |
I think that's because nuxt runs the dev server with Node by default and the issue is with bun runtime here. |
Got the In my case, it's caused by nuxt-purgecss module. Disable it make my environment work.
|
Hi, does Bun 1.0.0 working with Nuxt 2 ? |
@sbstnplcn, @Illuday , it's this consola issue that hasn't been resolved yet. If you are able to update to a newer next 2.x or nuxt 3.x that should do it. |
@birkskyum thanks for your answer, I'm already running the last Nuxt v2.17.1 version and can't move to 3.x for now, I will wait until Nuxt release a new v2.x version with this resolved issue. |
Got the error on nuxt 3.7.1, the problem for me is nuxt-purgecss! |
Anyone solved / worked around this?
|
It could be because of |
Something that could be related that happens to me, when I run |
I get the exact same error with the Running Nuxt 3.7.1 on WSL 2 Ubuntu |
I tried to investigate more into the problem with nuxt 2 & consola. The reason why it doesn't work with consola 2 is that consola 2 is using
However, I still can't build my code because this error #4591. I got these errors:
|
that one is similar to |
I'm having an issue with consola 2.15 too, because of https:/vbenjs/vite-plugin-html. Unfortunately we can't yet use overrides (#1134) |
Without NodeJS installed,
I can't even initialize a Nuxt 3 app with only bun installed on the system. These are the instructions from bun's release blog post. As I understand it, bun should only use NodeJS by default if |
@tuan3w , can you can try upgrading to latest canary and build again? The "stacks.shift" issue should be resolved now |
Hi @birkskyum Thanks for the update. After updating to the latest canary, I got this error while building:
Extra information:
|
BUT... the app started by |
Since #5842 was merged I tested with |
Consola issues seem to be fixed now, but these errors still exist. |
@romastolbov , do you see that on latest versions as well? I get this output with ➜ bun --bun run dev
$ nuxt dev
Nuxt 3.8.2 with Nitro 2.8.1 12:29:06 PM
12:29:07 PM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
➜ DevTools: press Shift + Option + D in the browser (v1.0.6) 12:29:07 PM
ℹ Vite client warmed up in 179ms 12:29:07 PM
ℹ Vite server warmed up in 638ms 12:29:08 PM
✔ Nitro built in 251 ms |
@birkskyum its ok now |
This is #7068 |
Also seeing this same error when running
|
To summarize, with (1.1.17+bb66bba1b) these commands work:
And this one doesn't:
Output from the preview command: ⇣5% ➜ bun --bun run preview
$ nuxt preview
12:08:33 AM
╭────────────────────────────────────────Preview Mode──────────────────────────────────────────╮
│ │
│ You are running Nuxt production build in preview mode. │
│ For production deployments, please directly use node ./server/index.mjs command. │
│ │
│ Node.js: v22.3.0 │
│ Nitro Preset: node-server │
│ Working directory: .output │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯
[12:08:33 AM] ℹ Loading .env. This will not be loaded when running the server in production.
ℹ Starting preview command: node ./server/index.mjs 12:08:33 AM
12:08:33 AM
ERROR Command failed: node ./server/index.mjs 12:08:33 AM
The first argument must be a Readable, a ReadableStream, or an async iterable.
at <anonymous> (node_modules/nuxi/dist/chunks/index3.mjs:1817:13)
at getStreamContents (node_modules/nuxi/dist/chunks/index3.mjs:1815:34)
at getStreamAsString (node_modules/nuxi/dist/chunks/index3.mjs:2030:34)
at <anonymous> (node_modules/nuxi/dist/chunks/index3.mjs:2218:24)
at getSpawnedResult (node_modules/nuxi/dist/chunks/index3.mjs:2217:26)
at <anonymous> (node_modules/nuxi/dist/chunks/index3.mjs:2504:94)
at <anonymous> (node_modules/nuxi/dist/chunks/index3.mjs:2503:24)
at onetime (node_modules/nuxi/dist/chunks/index3.mjs:813:28)
at <anonymous> (node_modules/nuxi/dist/chunks/index3.mjs:2247:51)
at processTicksAndRejections (:12:39)
ERROR Command failed: node ./server/index.mjs 12:08:33 AM
The first argument must be a Readable, a ReadableStream, or an async iterable.
error: script "preview" exited with code 1
Listening on http://[::]:3000 I believe this requires modifications to nuxt, to be able to specify or detect the nitro preset, so that it's not always node-server. Explicit specification could be a --preset flag like vinxi start has. |
@birkskyum Here are also some lingering issues on other commands:
|
Nuxt.js GitHub - Website
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 nuxi@latest init my-nuxt-app
bun
as package managercd my-nuxt-app
bun --bun run dev
What is the expected behavior?
What do you see instead?
Additional information
Related:
fs.cp
,fs.cpSync
andfsPromises.cp
are missing #1519The text was updated successfully, but these errors were encountered: