vercel/next.js · error
`experimental.cssChunking: "graph"` is only supported with T
Error message
`experimental.cssChunking: "graph"` is only supported with Turbopack. Please remove the option or run Next.js with Turbopack in ${configFileName}. What it means
`experimental.cssChunking: "graph"` produces bundle-graph-aware CSS chunks, a strategy only implemented for Turbopack. If the value resolves to 'graph' but Turbopack is not active (`process.env.TURBOPACK` unset), normalization throws. Note this check is skipped during `next start` (PHASE_PRODUCTION_SERVER) and PHASE_INFO since no bundler is chosen then.
Source
Thrown at packages/next/src/server/config.ts:521
result.sassOptions &&
'functions' in result.sassOptions
) {
throw new Error(
`The "sassOptions.functions" option is not supported when using Turbopack. ` +
`Custom Sass functions are only available with webpack. ` +
`Please remove the "functions" property from your sassOptions in ${configFileName}.`
)
}
// Validate experimental.cssChunking compatibility with the active bundler. Graph mode is
// Turbopack-only; strict mode and `false` (single-chunk-per-module) are webpack-only.
// Only validate during build/dev — `next start` doesn't pick a bundler and would otherwise
// see `process.env.TURBOPACK` unset and reject a valid `cssChunking: "graph"` config.
if (phase !== PHASE_PRODUCTION_SERVER && phase !== PHASE_INFO) {
const cssChunkingValue = result.experimental.cssChunking
const cssChunkingMode = resolveCssChunkingMode(cssChunkingValue)
if (cssChunkingMode === 'graph' && !process.env.TURBOPACK) {
throw new Error(
`\`experimental.cssChunking: "graph"\` is only supported with Turbopack. ` +
`Please remove the option or run Next.js with Turbopack in ${configFileName}.`
)
}
if (cssChunkingMode === 'strict' && process.env.TURBOPACK) {
throw new Error(
`\`experimental.cssChunking: "strict"\` is only supported with webpack. ` +
`Please remove the option or run Next.js with webpack in ${configFileName}.`
)
}
// Only error when `false` was set explicitly. `undefined` (the default) also resolves to
// `'off'` but that's the implicit default and must not error on Turbopack.
if (cssChunkingValue === false && process.env.TURBOPACK) {
throw new Error(
`\`experimental.cssChunking: false\` is only supported with webpack. ` +
`Please remove the option or run Next.js with webpack in ${configFileName}.`
)
}View on GitHub (pinned to 0ae8c72462)
Solutions
- Run with Turbopack (remove `--webpack`) to use graph mode
- Switch to a webpack-compatible cssChunking value: omit it (default) or use a webpack-supported mode
Example fix
// before
// next build --webpack
module.exports = { experimental: { cssChunking: 'graph' } }
// after (option A)
module.exports = { experimental: { cssChunking: 'graph' } }
// run: next build (Turbopack)
// after (option B)
module.exports = { experimental: { cssChunking: 'strict' } }
// run: next build --webpack Defensive patterns
Strategy: validation
Validate before calling
const isTurbopack = Boolean(process.env.TURBOPACK)
if (cssChunking === 'graph' && !isTurbopack) {
cssChunking = undefined // or switch bundler
} Prevention
- Gate cssChunking on the active bundler before setting it
- Document which cssChunking modes each bundler supports in the config
When it happens
Trigger: Setting `experimental: { cssChunking: 'graph' }` and running `next build`/`next dev` with webpack (`--webpack` or default where Turbopack isn't engaged).
Common situations: Adopting CSS chunking graph mode after reading docs written for Turbopack, then running a webpack build. Forcing webpack in CI while keeping Turbopack-only options.
Related errors
- `experimental.cssChunking: "strict"` is only supported with
- `experimental.cssChunking: false` is only supported with web
- `experimental.turbopackRustReactCompiler` is only supported
- The "sassOptions.functions" option is not supported when usi
- `experimental.turbopackGenerateComponentChunks` has been mov
AI-assisted analysis of vercel/next.js@0ae8c72462 (2026-08-06).
Data as JSON: /api/errors/fe71aab4650c719c.
Report an issue: GitHub.