Repository navigation
fix(nextjs): Keep the default Turbopack loader runtime in next dev on Bun - #26923
Merged
Merged
Conversation
…on Bun With `workerThreads`, the Turbopack loaders run in the `next dev` server process. Bun then caches that `.next/dev` has no `node_modules` folder, and cannot load the externals that Turbopack links there later. The dev server fails at start with "Cannot find module '<package>-<hash>'". `withSentryConfig` now sets `workerThreads` only for `next build`. The new optional `nextjs-16 (bun, turbopack, development)` E2E variant runs the dev tests with `bun --bun next dev`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
size-limit report 📦Compared: 198b14f (PR test merge using develop at cbff039) Against: cbff039 (develop) · base run #68111 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsAll optional checks were successful. 7 successful. See the run. Successful checks
|
chargome
approved these changes
Nov 26, 2026
51 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #26911
closes JS-4166
Description
This keeps the default Turbopack loader runtime of Next.js in
next devon Bun.withSentryConfignow setsworkerThreadsonly fornext build. It also adds the optionalnextjs-16 (bun, turbopack, development)E2E variant, which runs the dev tests withbun --bun next dev.Why
Since #26293,
bun --bun next devfails at start with "Cannot find module '@sentry/nextjs-'". With worker threads, the loaders run in the dev server process. Bun then caches that.next/devhas nonode_modulesfolder, and does not see the externals that Turbopack links there later.