"next dev --turbo" fails in WASM with error (turbo.createProject
is not supported by the wasm bindings)
#75665
Replies: 16 comments
-
@theshadowagent Thank you for submitting an issue! I was not able to |
Beta Was this translation helpful? Give feedback.
-
the link provided works fine - no WASM errors on stackblitz |
Beta Was this translation helpful? Give feedback.
-
@samcx @abhi12299
![]() Apologies for confusing you here – I couldn't find a way to change the default run command in Stackblitz Thanks for the swift response! |
Beta Was this translation helpful? Give feedback.
-
Also wanted to add about why it's important for me: |
Beta Was this translation helpful? Give feedback.
-
Turbopack does not have a WebAssembly build currently so I'm not expecting it to work on Stackblitz right now. It's not unexpected that running in Stackblitz is slower than locally because it will have to download the WebAssembly binary and then use that instead of using the native bindings. |
Beta Was this translation helpful? Give feedback.
-
@timneutkens thanks, I understand. Is WebAssembly build for Turbopack on the roadmap somewhere, or should I switch to server environment? On WebAssembly binary: I've managed to reduce the time by 2x via adding Still, compile step takes about 10s, so WebAssembly build for Turbopack would be amazing. |
Beta Was this translation helpful? Give feedback.
-
We're currently focused on making sure that as many people as possible get the benefits of Turbopack, which means prioritizing development / builds with the native binding, after Turbopack development and build are stable we can investigate WebAssembly builds, though it's not straightforward to add this because of the premise of the compiler, which includes file watching, disk access (read/write) etc. |
Beta Was this translation helpful? Give feedback.
-
Got it, makes total sense! I think I'll switch to server VMs for now. I'm curious if this release helps to progress on this: https://deno.com/blog/rusty-v8-stabilized |
Beta Was this translation helpful? Give feedback.
-
Bumping this, except for me rather than not working on stackblitz it doesn't work on my FreeBSD laptop |
Beta Was this translation helpful? Give feedback.
-
Finally, I fix it - the solution was so simple: just upgrade the Node.js version using NVM with this command Edit: |
Beta Was this translation helpful? Give feedback.
-
I'm currently running the next boilerplate on a termux install. I'm running the latest version of nodejs built for arm64 I get this same error on a fresh install for the boilerplate project. |
Beta Was this translation helpful? Give feedback.
-
You can optionally disable turbo and use webpack. |
Beta Was this translation helpful? Give feedback.
-
i ran into this error too i guess it happened because while creating the nextjs app some packages are not installed correctly what i did is delete the project and create it from the start and the error no longer exists solution: |
Beta Was this translation helpful? Give feedback.
-
![]() Hi, I am getting this error with create-next-app@latest and next@latest (15.1.6). Edit: can reproduce in stackblitz |
Beta Was this translation helpful? Give feedback.
-
I had the same issue, and this worked for me: 🚀 Hope this helps! ✨ |
Beta Was this translation helpful? Give feedback.
-
It worked for me. |
Beta Was this translation helpful? Give feedback.
-
Link to the code that reproduces this issue
https://stackblitz.com/edit/stackblitz-starters-yew3c9
To Reproduce
next
dev server with Turbopack (next dev --turbo
) in WASM (e.g. using webcontainers.io)dev
command fails with errorCurrent vs. Expected behavior
I expected
next dev --turbo
to work in WASM mode so I could have fast hot reloading, but it throws this errorProvide environment information
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I tested my reproduction against "15.0.0-canary.171" (latest canary release), and "14.2.13" (latest stable release). On stable it outputs a different error:
TypeError: bindings.turbo.createProject is not a function
.I found the code that throws this:
next.js/packages/next/src/build/swc/index.ts
Line 1063 in 3ed9f4b
Is wasm bindings support planned for turbopack anytime soon? Was very bummed to see this, since it considerably slows down next.js in browser IDEs.
Beta Was this translation helpful? Give feedback.
All reactions