nextjs - 💡(How to fix) Fix [bug]: Turbopack build fails on Vercel with React Compiler [6 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85942Fetched 2026-04-08 02:13:19
View on GitHub
Comments
6
Participants
4
Timeline
13
Reactions
1
Author
Timeline (top)
commented ×6labeled ×2closed ×1issue_type_added ×1

Error Message

07:36:42.125 Running build in Washington, D.C., USA (East) – iad1 07:36:42.131 Build machine configuration: 2 cores, 8 GB 07:36:42.618 Cloning github.com/bennajah/next16-example (Branch: main, Commit: ef72df2) 07:36:43.751 Cloning completed: 1.132s 07:36:44.777 Restored build cache from previous deployment (5Mh1s41Mvr7KCperL95rUh6a683W) 07:36:45.295 Running "vercel build" 07:36:45.955 Vercel CLI 48.9.0 07:36:46.283 Installing dependencies... 07:36:46.318 bun install v1.2.23 (cf136713) 07:36:46.622 07:36:46.622 + [email protected] 07:36:46.622 + [email protected] 07:36:46.622 + [email protected] 07:36:46.623 + [email protected] 07:36:46.623 + [email protected] 07:36:46.623 + [email protected] 07:36:46.623 07:36:46.624 6 packages installed [319.00ms] 07:36:46.627 Detected Next.js version: 16.0.2-canary.12 07:36:46.630 Running "bun run build" 07:36:46.636 $ bun run --bun next build 07:36:48.676 ▲ Next.js 16.0.2-canary.12 (Turbopack) 07:36:48.677 07:36:48.715 Creating an optimized production build ... 07:36:48.740 Error [NotImplementedError]: worker_threads.Worker option "stdout" is not yet implemented in Bun. 07:36:48.740 at warnNotImplementedOnce (internal:shared:26:37) 07:36:48.741 at new WorkerPool (unknown:1:23) { 07:36:48.741 code: 'ERR_NOT_IMPLEMENTED' 07:36:48.741 } 07:36:48.741 Error [NotImplementedError]: worker_threads.Worker option "stderr" is not yet implemented in Bun. 07:36:48.742 at warnNotImplementedOnce (internal:shared:26:37) 07:36:48.742 at new WorkerPool (unknown:1:23) { 07:36:48.742 code: 'ERR_NOT_IMPLEMENTED' 07:36:48.742 } 07:36:48.742 Error [NotImplementedError]: worker_threads.Worker option "resourceLimits" is not yet implemented in Bun. 07:36:48.742 at warnNotImplementedOnce (internal:shared:26:37) 07:36:48.742 at new WorkerPool (unknown:1:23) { 07:36:48.742 code: 'ERR_NOT_IMPLEMENTED' 07:36:48.742 } 07:36:55.178 07:36:55.179 > Build error occurred 07:36:55.180 Error: Turbopack build failed with 1 errors: 07:36:55.180 ./components/theme-provider.tsx 07:36:55.180 Error evaluating Node.js code 07:36:55.181 ResolveMessage: Cannot find module './node_modules/babel-plugin-react-compiler' from '/vercel/path0/node_modules/next/dist/compiled/babel/bundle.js' 07:36:55.181 07:36:55.181 Make sure that all the Babel plugins and presets you are using 07:36:55.181 are defined as dependencies or devDependencies in your package.json 07:36:55.182 file. It's possible that the missing plugin is loaded by a preset 07:36:55.182 you are using that forgot to add the plugin to its dependencies: you 07:36:55.182 can workaround this problem by explicitly adding the missing package 07:36:55.182 to your top-level package.json. 07:36:55.182 07:36:55.183 07:36:55.183 Import trace: 07:36:55.183 Server Component: 07:36:55.183 ./components/theme-provider.tsx 07:36:55.183 ./app/layout.tsx 07:36:55.183 07:36:55.183 07:36:55.184 at <unknown> (file. It's possible that the missing plugin is loaded by a preset) 07:36:55.184 at processTicksAndRejections (null) 07:36:55.208 error: "next" exited with code 1 07:36:55.208 error: script "build" exited with code 1 07:36:55.220 Error: Command "bun run build" exited with 1

Fix Action

Fix / Workaround

Vercel Build Logs:

07:36:42.125 Running build in Washington, D.C., USA (East) – iad1
07:36:42.131 Build machine configuration: 2 cores, 8 GB
07:36:42.618 Cloning github.com/bennajah/next16-example (Branch: main, Commit: ef72df2)
07:36:43.751 Cloning completed: 1.132s
07:36:44.777 Restored build cache from previous deployment (5Mh1s41Mvr7KCperL95rUh6a683W)
07:36:45.295 Running "vercel build"
07:36:45.955 Vercel CLI 48.9.0
07:36:46.283 Installing dependencies...
07:36:46.318 bun install v1.2.23 (cf136713)
07:36:46.622 
07:36:46.622 + [email protected]
07:36:46.622 + [email protected]
07:36:46.622 + [email protected]
07:36:46.623 + [email protected]
07:36:46.623 + [email protected]
07:36:46.623 + [email protected]
07:36:46.623 
07:36:46.624 6 packages installed [319.00ms]
07:36:46.627 Detected Next.js version: 16.0.2-canary.12
07:36:46.630 Running "bun run build"
07:36:46.636 $ bun run --bun next build
07:36:48.676    ▲ Next.js 16.0.2-canary.12 (Turbopack)
07:36:48.677 
07:36:48.715    Creating an optimized production build ...
07:36:48.740 Error [NotImplementedError]: worker_threads.Worker option "stdout" is not yet implemented in Bun.
07:36:48.740     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.741     at new WorkerPool (unknown:1:23) {
07:36:48.741   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.741 }
07:36:48.741 Error [NotImplementedError]: worker_threads.Worker option "stderr" is not yet implemented in Bun.
07:36:48.742     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.742     at new WorkerPool (unknown:1:23) {
07:36:48.742   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.742 }
07:36:48.742 Error [NotImplementedError]: worker_threads.Worker option "resourceLimits" is not yet implemented in Bun.
07:36:48.742     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.742     at new WorkerPool (unknown:1:23) {
07:36:48.742   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.742 }
07:36:55.178 
07:36:55.179 > Build error occurred
07:36:55.180 Error: Turbopack build failed with 1 errors:
07:36:55.180 ./components/theme-provider.tsx
07:36:55.180 Error evaluating Node.js code
07:36:55.181 ResolveMessage: Cannot find module './node_modules/babel-plugin-react-compiler' from '/vercel/path0/node_modules/next/dist/compiled/babel/bundle.js'
07:36:55.181 
07:36:55.181 Make sure that all the Babel plugins and presets you are using
07:36:55.181 are defined as dependencies or devDependencies in your package.json
07:36:55.182 file. It's possible that the missing plugin is loaded by a preset
07:36:55.182 you are using that forgot to add the plugin to its dependencies: you
07:36:55.182 can workaround this problem by explicitly adding the missing package
07:36:55.182 to your top-level package.json.
07:36:55.182 
07:36:55.183 
07:36:55.183 Import trace:
07:36:55.183   Server Component:
07:36:55.183     ./components/theme-provider.tsx
07:36:55.183     ./app/layout.tsx
07:36:55.183 
07:36:55.183 
07:36:55.184     at <unknown> (file. It's possible that the missing plugin is loaded by a preset)
07:36:55.184     at processTicksAndRejections (null)
07:36:55.208 error: "next" exited with code 1
07:36:55.208 error: script "build" exited with code 1
07:36:55.220 Error: Command "bun run build" exited with 1

Code Example

07:36:42.125 Running build in Washington, D.C., USA (East) – iad1
07:36:42.131 Build machine configuration: 2 cores, 8 GB
07:36:42.618 Cloning github.com/bennajah/next16-example (Branch: main, Commit: ef72df2)
07:36:43.751 Cloning completed: 1.132s
07:36:44.777 Restored build cache from previous deployment (5Mh1s41Mvr7KCperL95rUh6a683W)
07:36:45.295 Running "vercel build"
07:36:45.955 Vercel CLI 48.9.0
07:36:46.283 Installing dependencies...
07:36:46.318 bun install v1.2.23 (cf136713)
07:36:46.622 
07:36:46.622 + tw-animate-css@1.4.0
07:36:46.622 + class-variance-authority@0.7.1
07:36:46.622 + clsx@2.1.1
07:36:46.623 + lucide-react@0.553.0
07:36:46.623 + next-themes@0.4.6
07:36:46.623 + tailwind-merge@3.3.1
07:36:46.623 
07:36:46.624 6 packages installed [319.00ms]
07:36:46.627 Detected Next.js version: 16.0.2-canary.12
07:36:46.630 Running "bun run build"
07:36:46.636 $ bun run --bun next build
07:36:48.676Next.js 16.0.2-canary.12 (Turbopack)
07:36:48.677 
07:36:48.715    Creating an optimized production build ...
07:36:48.740 Error [NotImplementedError]: worker_threads.Worker option "stdout" is not yet implemented in Bun.
07:36:48.740     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.741     at new WorkerPool (unknown:1:23) {
07:36:48.741   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.741 }
07:36:48.741 Error [NotImplementedError]: worker_threads.Worker option "stderr" is not yet implemented in Bun.
07:36:48.742     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.742     at new WorkerPool (unknown:1:23) {
07:36:48.742   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.742 }
07:36:48.742 Error [NotImplementedError]: worker_threads.Worker option "resourceLimits" is not yet implemented in Bun.
07:36:48.742     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.742     at new WorkerPool (unknown:1:23) {
07:36:48.742   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.742 }
07:36:55.178 
07:36:55.179 > Build error occurred
07:36:55.180 Error: Turbopack build failed with 1 errors:
07:36:55.180 ./components/theme-provider.tsx
07:36:55.180 Error evaluating Node.js code
07:36:55.181 ResolveMessage: Cannot find module './node_modules/babel-plugin-react-compiler' from '/vercel/path0/node_modules/next/dist/compiled/babel/bundle.js'
07:36:55.181 
07:36:55.181 Make sure that all the Babel plugins and presets you are using
07:36:55.181 are defined as dependencies or devDependencies in your package.json
07:36:55.182 file. It's possible that the missing plugin is loaded by a preset
07:36:55.182 you are using that forgot to add the plugin to its dependencies: you
07:36:55.182 can workaround this problem by explicitly adding the missing package
07:36:55.182 to your top-level package.json.
07:36:55.182 
07:36:55.183 
07:36:55.183 Import trace:
07:36:55.183   Server Component:
07:36:55.183     ./components/theme-provider.tsx
07:36:55.183     ./app/layout.tsx
07:36:55.183 
07:36:55.183 
07:36:55.184     at <unknown> (file. It's possible that the missing plugin is loaded by a preset)
07:36:55.184     at processTicksAndRejections (null)
07:36:55.208 error: "next" exited with code 1
07:36:55.208 error: script "build" exited with code 1
07:36:55.220 Error: Command "bun run build" exited with 1

---

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 12244
  Available CPU cores: 8
Binaries:
  Node: 24.11.0
  npm: 11.6.1
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.2-canary.12 // Latest available version is detected (16.0.2-canary.12).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/bennajah/next16-example

To Reproduce

  1. Clone the repo
  2. Run a local build — ✅ succeeds
  3. Deploy to Vercel — ❌ build fails with an error

Current vs. Expected behavior

The project builds successfully when running locally (no errors). However, when deploying to Vercel, the build fails with an error during the build process.

Vercel Build Logs:

07:36:42.125 Running build in Washington, D.C., USA (East) – iad1
07:36:42.131 Build machine configuration: 2 cores, 8 GB
07:36:42.618 Cloning github.com/bennajah/next16-example (Branch: main, Commit: ef72df2)
07:36:43.751 Cloning completed: 1.132s
07:36:44.777 Restored build cache from previous deployment (5Mh1s41Mvr7KCperL95rUh6a683W)
07:36:45.295 Running "vercel build"
07:36:45.955 Vercel CLI 48.9.0
07:36:46.283 Installing dependencies...
07:36:46.318 bun install v1.2.23 (cf136713)
07:36:46.622 
07:36:46.622 + [email protected]
07:36:46.622 + [email protected]
07:36:46.622 + [email protected]
07:36:46.623 + [email protected]
07:36:46.623 + [email protected]
07:36:46.623 + [email protected]
07:36:46.623 
07:36:46.624 6 packages installed [319.00ms]
07:36:46.627 Detected Next.js version: 16.0.2-canary.12
07:36:46.630 Running "bun run build"
07:36:46.636 $ bun run --bun next build
07:36:48.676    ▲ Next.js 16.0.2-canary.12 (Turbopack)
07:36:48.677 
07:36:48.715    Creating an optimized production build ...
07:36:48.740 Error [NotImplementedError]: worker_threads.Worker option "stdout" is not yet implemented in Bun.
07:36:48.740     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.741     at new WorkerPool (unknown:1:23) {
07:36:48.741   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.741 }
07:36:48.741 Error [NotImplementedError]: worker_threads.Worker option "stderr" is not yet implemented in Bun.
07:36:48.742     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.742     at new WorkerPool (unknown:1:23) {
07:36:48.742   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.742 }
07:36:48.742 Error [NotImplementedError]: worker_threads.Worker option "resourceLimits" is not yet implemented in Bun.
07:36:48.742     at warnNotImplementedOnce (internal:shared:26:37)
07:36:48.742     at new WorkerPool (unknown:1:23) {
07:36:48.742   code: 'ERR_NOT_IMPLEMENTED'
07:36:48.742 }
07:36:55.178 
07:36:55.179 > Build error occurred
07:36:55.180 Error: Turbopack build failed with 1 errors:
07:36:55.180 ./components/theme-provider.tsx
07:36:55.180 Error evaluating Node.js code
07:36:55.181 ResolveMessage: Cannot find module './node_modules/babel-plugin-react-compiler' from '/vercel/path0/node_modules/next/dist/compiled/babel/bundle.js'
07:36:55.181 
07:36:55.181 Make sure that all the Babel plugins and presets you are using
07:36:55.181 are defined as dependencies or devDependencies in your package.json
07:36:55.182 file. It's possible that the missing plugin is loaded by a preset
07:36:55.182 you are using that forgot to add the plugin to its dependencies: you
07:36:55.182 can workaround this problem by explicitly adding the missing package
07:36:55.182 to your top-level package.json.
07:36:55.182 
07:36:55.183 
07:36:55.183 Import trace:
07:36:55.183   Server Component:
07:36:55.183     ./components/theme-provider.tsx
07:36:55.183     ./app/layout.tsx
07:36:55.183 
07:36:55.183 
07:36:55.184     at <unknown> (file. It's possible that the missing plugin is loaded by a preset)
07:36:55.184     at processTicksAndRejections (null)
07:36:55.208 error: "next" exited with code 1
07:36:55.208 error: script "build" exited with code 1
07:36:55.220 Error: Command "bun run build" exited with 1

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 12244
  Available CPU cores: 8
Binaries:
  Node: 24.11.0
  npm: 11.6.1
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.2-canary.12 // Latest available version is detected (16.0.2-canary.12).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Turbopack

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

Vercel (Deployed)

Additional context

No response

extent analysis

TL;DR

The build fails on Vercel due to missing dependencies and unimplemented features in Bun, suggesting a potential issue with the Next.js version or the build process.

Guidance

  1. Check dependencies: Ensure all required dependencies, including Babel plugins and presets, are listed in package.json as either dependencies or devDependencies.
  2. Verify Next.js version: Confirm that the Next.js version (16.0.2-canary.12) is compatible with the build process on Vercel and consider updating or downgrading if necessary.
  3. Investigate Bun compatibility: Research if there are known issues with Bun (version 1.2.23) and Next.js, particularly regarding the worker_threads module and its implementation.
  4. Explicitly add missing packages: As suggested by the error message, try explicitly adding the missing babel-plugin-react-compiler package to the top-level package.json to resolve the build error.

Example

No code example is provided due to the nature of the issue, which seems to be related to configuration and dependency management rather than code syntax.

Notes

  • The issue might be specific to the combination of Next.js version, Bun, and the build process on Vercel.
  • Further investigation into the compatibility of these components and their versions is necessary.
  • The error messages indicate both a missing module and unimplemented features in Bun, suggesting a complex issue that may require updates or workarounds.

Recommendation

Apply a workaround by explicitly adding the missing packages to package.json and consider updating Next.js or Bun to versions known to be compatible with each other and the Vercel build process.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix [bug]: Turbopack build fails on Vercel with React Compiler [6 comments, 4 participants]