webcontainer-core icon indicating copy to clipboard operation
webcontainer-core copied to clipboard

[Bug] The latest Next.js version fails to start

Open igordanchenko opened this issue 2 months ago • 0 comments

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

  1. Create new Next.js project using StackBlitz Next.js starter template
  2. Open package.json
  3. Bump next and eslint-config-next versions to 14.2.1 or 14.2.2
  4. Restart the server in the console (npm install && npx next dev)
  5. 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

Screenshots

Screenshot 2024-04-22 at 4 15 50 PM

Platform

  • OS: macOS Sonoma 14.4.1
  • Browser: Chrome
  • Version: 124.0.6367.62 (Official Build) (x86_64)

Additional context

No response

igordanchenko avatar Apr 22 '24 20:04 igordanchenko