Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next dev --turbopack does not support using @next/bundle-analyzer - throws warning #77482

Open
Austin1serb opened this issue Mar 24, 2025 · 0 comments
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. Turbopack Related to Turbopack with Next.js.

Comments

@Austin1serb
Copy link

Link to the code that reproduces this issue

https://github.com/Austin1serb/next-turbopack-issue

To Reproduce

  1. Clone the reproduction repo
  git clone https://github.com/Austin1serb/next-turbopack-issue
  cd next-turbopack-issue
  pnpm install # or npm install
  1. Start the development server using Turbopack
pnpm run dev --turbo
  1. Observe the following console warnings:

⚠ 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

  1. Now open next.config.js and replace this line:
export default withAnalyzer(nextConfig)

with:

export default nextConfig

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

@github-actions github-actions bot added create-next-app Related to our CLI tool for quickly starting a new Next.js application. Turbopack Related to Turbopack with Next.js. labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant