Next.js Discord

Discord Forum

Unable to open report @next/bundle-analyzer (ANALYZE=true npm run build does not display URL)

Unanswered
Alligator mississippiensis posted this in #help-forum
Open in Discord
Alligator mississippiensisOP
Hi everyone,

I'm configuring @next/bundle-analyzer in a Next.js 15.5.3 + Turbopack project.
I've successfully added the plugin to my next.config.mjs:

import bundleAnalyzer from "@next/bundle-analyzer";

const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
analyzerMode: "server",
openAnalyzer: true,
});

const nextConfig = {
};

export default withBundleAnalyzer(nextConfig);

When I run:

ANALYZE=true npm run build

the build runs normally (compilation OK, route summary/First Load JS in the terminal), but I never get the report URL and no window opens.

0 Replies