vercel / next.js

The React Framework
https://nextjs.org
MIT License
125.2k stars 26.75k forks source link

FATAL: An unexpected Turbopack error occurred on 15.0.0-canary.134 and beyond #69592

Closed tonyabracadabra closed 2 weeks ago

tonyabracadabra commented 3 weeks ago

Link to the code that reproduces this issue

https://github.com/tonyabracadabra/nextjs-bug-report

To Reproduce

  1. Set up a Next.js project with the specified versions of Next.js, React, and React-DOM.
  2. Run the command bun run build on a MacOS system with an M3 chip.
  3. Observe the build process terminate with the SIGABRT error.
  4. Deploy the same project to Vercel and observe the same error.

Current vs. Expected behavior

Expected Behavior: The build should complete successfully without causing a Turbopack error or panic.

Actual Behavior: The build fails, causing a SIGABRT error and an unexpected Turbopack error.

Error output:

Running "bun run build"
$ next build
  ▲ Next.js 15.0.0-canary.135
  - Experiments (use with caution):
    · ppr
    · after
    · reactCompiler
   Creating an optimized production build ...
Generated 17 documents in .contentlayer
FATAL: An unexpected Turbopack error occurred. Please report the content of /tmp/next-panic-e976530208d18ad8019ad0fef34b622f.log to https://github.com/vercel/next.js/issues/new
thread caused non-unwinding panic. aborting.
error: script "build" was terminated by signal SIGABRT (Abort)
Error: Command "bun run build" exited with SIGABRT

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031
  Available memory (MB): 98304
  Available CPU cores: 14
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: N/A
  pnpm: 9.6.0
Relevant Packages:
  next: 15.0.0-canary.134 // There is a newer canary version (15.0.0-canary.139) available, please upgrade! 
  eslint-config-next: 15.0.0-rc.0
  react: 19.0.0-rc-f994737d14-20240522
  react-dom: 19.0.0-rc-f994737d14-20240522
  typescript: 5.5.4

Which area(s) are affected? (Select all that apply)

Runtime, Turbopack, SWC

Which stage(s) are affected? (Select all that apply)

next build (local), Vercel (Deployed)

Additional context

A fix of this is likely related to https://github.com/swc-project/swc/pull/9524

airhorns commented 2 weeks ago

Should be resolved by https://github.com/vercel/next.js/pull/69605

mischnic commented 2 weeks ago

@kdy1 can this be closed?

kdy1 commented 2 weeks ago

I think so. https://github.com/vercel/next.js/pull/69605 is published as v15.0.0-canary.141