node-sass has been officially deprecated since 2022 and is now end-of-life. It breaks on every new Node.js version upgrade with the error:
"Node Sass does not yet support your current environment"
Yet it still gets 3 million+ downloads per week from legacy projects.
The fix
I published an automated migration CLI:
npm install -g node-sass-migrate
Or just run it directly:
npx node-sass-migrate .
What it does automatically
- Replaces node-sass with sass (Dart Sass) in package.json
- Fixes /deep/ → ::v-deep in SCSS files (Vue projects)
- Updates webpack.config.js, vite.config.js, and gulpfile.js references
- Warns about @import deprecations and division operator issues
Why not just swap manually?
Dart Sass is stricter than node-sass. These things break silently:
- /deep/ selector throws parse errors
- Division operator ($var / 2) is deprecated — need math.div()
- @import is deprecated — will be removed in Dart Sass 2.0
- sass-loader needs to be version 13+
The CLI handles the safe fixes automatically and warns you about the rest.
After running the CLI
Just run npm install and your project should build. If you hit errors, the full migration guide is at https://nodesassmigrate.netlify.app
npm: https://www.npmjs.com/package/node-sass-migrate
GitHub: https://github.com/takundanashebmuchena-pixel/node-sass-migrate
Top comments (0)