vercel/next.js · error
Your project has both `sass` and `node-sass` installed as de
Error message
Your project has both `sass` and `node-sass` installed as dependencies, but should only use one or the other. Please remove the `node-sass` dependency from your project. Read more: https://nextjs.org/docs/messages/duplicate-sass
What it means
Error "Your project has both `sass` and `node-sass` installed as dependencies, but should only use one or the other. Please remove the `node-sass` dependency from your project. Read more: https://nextjs.org/docs/messages/duplicate-sass" thrown in vercel/next.js.
Source
Thrown at packages/next/src/cli/next-dev.ts:237
}
if (options.experimentalCpuProf) {
Log.info(
`CPU profiling enabled. Profile will be saved to .next-profiles/ on exit (Ctrl+C).`
)
}
async function preflight(skipOnReboot: boolean) {
const { getPackageVersion, getDependencies } = (await Promise.resolve(
require('../lib/get-package-version') as typeof import('../lib/get-package-version')
)) as typeof import('../lib/get-package-version')
const [sassVersion, nodeSassVersion] = await Promise.all([
getPackageVersion({ cwd: dir, name: 'sass' }),
getPackageVersion({ cwd: dir, name: 'node-sass' }),
])
if (sassVersion && nodeSassVersion) {
Log.warn(
'Your project has both `sass` and `node-sass` installed as dependencies, but should only use one or the other. ' +
'Please remove the `node-sass` dependency from your project. ' +
' Read more: https://nextjs.org/docs/messages/duplicate-sass'
)
}
if (!skipOnReboot) {
const { dependencies, devDependencies } = await getDependencies({
cwd: dir,
})
// Warn if @next/font is installed as a dependency. Ignore `workspace:*` to not warn in the Next.js monorepo.
if (
dependencies['@next/font'] ||
(devDependencies['@next/font'] &&
devDependencies['@next/font'] !== 'workspace:*')
) {
const command = getNpxCommand(dir)View on GitHub (pinned to 0eb3775416)
Solutions
- Remove `node-sass` from your dependencies and keep only `sass`.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/cli/next-dev.ts:237 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/fc212da1af13a0ca.
Report an issue: GitHub.