webcontainer-core
webcontainer-core copied to clipboard
[Bug] The latest Next.js version fails to start
Describe the bug
Starting with Next.js version 14.2.1, Next.js process fails to start due to the following error:
✓ Starting... ⚠ Attempted to load @next/swc-linux-x64-gnu, but an error occurred: Cannot load native addon because loading addons is disabled: /home/projects/stackblitz-starters-gtp33x/node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node ⚠ Attempted to load @next/swc-linux-x64-musl, but an error occurred: Cannot load native addon because loading addons is disabled: /home/projects/stackblitz-starters-gtp33x/node_modules/@next/swc-linux-x64-musl/next-swc.linux-x64-musl.node ⨯ Failed to load SWC binary for linux/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
This is happening only with the latest Next.js versions (14.2.1 and 14.2.2 as of the time of this writing). Downgrading to v14.2.0 or earlier resolves this error.
Link to the blitz that caused the error
https://stackblitz.com/edit/stackblitz-starters-gtp33x?file=package.json
Steps to reproduce
- Create new Next.js project using StackBlitz Next.js starter template
- Open
package.json
- Bump
next
andeslint-config-next
versions to 14.2.1 or 14.2.2 - Restart the server in the console (
npm install && npx next dev
) - Next.js server fails to start
Expected behavior
It would be great to be able to use the latest Next.js versions moving forward.
Parity with Local
- [X] I have run the project in my local machine and I could not reproduce the issue.
Screenshots
Platform
- OS: macOS Sonoma 14.4.1
- Browser: Chrome
- Version: 124.0.6367.62 (Official Build) (x86_64)
Additional context
No response