next dev --turbopack does not support using @next/bundle-analyzer - throws warning #77482
Labels
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/Austin1serb/next-turbopack-issue
To Reproduce
⚠ Webpack is configured while Turbopack is not, which may cause problems.
⚠ See instructions if you need to configure Turbopack: https://nextjs.org/docs/app/api-reference/next-config-js/turbo
with:
Then rerun the dev server — the warnings disappear.
Current vs. Expected behavior
Current behavior: When using @next/bundle-analyzer with next dev --turbo, Next.js logs Webpack-related warnings even though the intention is to use Turbopack. The message is confusing because the user may not be explicitly using Webpack — it's indirectly triggered by the analyzer config. But does not tell the user so.
Expected behavior: Either:
Turbopack should detect and gracefully skip incompatible tools like @next/bundle-analyzer, or
Documentation should clearly state that @next/bundle-analyzer is not compatible with Turbopack in dev, and the warnings should be more helpful, because doing exactly what they docs say, should not lead to a warning.
At the very minimum it should tell the user that next/bundle-analyzer it the cause of the warning, and what to do from there.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:23:36 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8112 Available memory (MB): 16384 Available CPU cores: 8 Binaries: Node: 20.16.0 npm: 10.8.2 Yarn: 1.22.22 pnpm: 10.6.5 Relevant Packages: next: 15.3.0-canary.20 // Latest available version is detected (15.3.0-canary.20). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.8.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack, create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: