-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Open
Labels
InstrumentationRelated to Next.js Instrumentation.Related to Next.js Instrumentation.Module ResolutionModule resolution (CJS / ESM, module resolving).Module resolution (CJS / ESM, module resolving).create-next-appRelated to our CLI tool for quickly starting a new Next.js application.Related to our CLI tool for quickly starting a new Next.js application.
Description
Link to the code that reproduces this issue
https://github.com/Aokoooooo/dev-bun-next
To Reproduce
- use bun@1.3.x, and run
bun installto install deps - run
bun run devin the vscode's JS debug terminal - can't start the project(stuck)
Current vs. Expected behavior
It should start the dev project in the JS debug terminal as it could work well in the normal terminal
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:35:32 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6020
Available memory (MB): 32768
Available CPU cores: 12
Binaries:
Node: 24.7.0
npm: 11.5.1
Yarn: 1.22.21
pnpm: 10.2.1
bun: 1.3.6
Relevant Packages:
next: 16.1.0
eslint-config-next: N/A
react: 19.2.3
react-dom: 19.2.3
typescript: 5.9.3
Next.js Config:
output: standaloneWhich area(s) are affected? (Select all that apply)
Instrumentation, create-next-app, Module Resolution
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I checked the code where got the stuck. Hope it could help.
In the next/dist/cli/next-dev, it forked a process and run next/dist/server/lib/start-server
child = (0, _child_process.fork)(startServerPath, {
stdio: 'inherit',
env: {
...defaultEnv,
...bundler === _bundler.Bundler.Turbopack ? {
TURBOPACK: process.env.TURBOPACK
} : undefined,
NEXT_PRIVATE_WORKER: '1',
NEXT_PRIVATE_TRACE_ID: _shared.traceId,
NODE_EXTRA_CA_CERTS: startServerOptions.selfSignedCertificate ? startServerOptions.selfSignedCertificate.rootCA : defaultEnv.NODE_EXTRA_CA_CERTS,
NODE_OPTIONS: (0, _utils.formatNodeOptions)(nodeOptions),
// There is a node.js bug on MacOS which causes closing file watchers to be really slow.
// This limits the number of watchers to mitigate the issue.
// https://github.com/nodejs/node/issues/29949
WATCHPACK_WATCHER_LIMIT: _os.default.platform() === 'darwin' ? '20' : undefined
}
});but if I use the bun in the JS debug terminal
the file 'start-server ' didn't load as I expected
Metadata
Metadata
Assignees
Labels
InstrumentationRelated to Next.js Instrumentation.Related to Next.js Instrumentation.Module ResolutionModule resolution (CJS / ESM, module resolving).Module resolution (CJS / ESM, module resolving).create-next-appRelated to our CLI tool for quickly starting a new Next.js application.Related to our CLI tool for quickly starting a new Next.js application.