node-sass Not Supported - Migrate to dart-sass in CI
node-sass is a native LibSass binding that is end-of-life. On a CI Node version it never published a binary for, it tries to compile from source and fails - the fix is to drop it for the pure-JS sass package.
What this error means
Install or build fails with node-sass gyp errors, or a runtime message that your Node version is unsupported. Bumping Node makes it worse, not better.
Error: Node Sass does not yet support your current environment:
OS X 64-bit with Unsupported runtime (127)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releasesCommon causes
No prebuilt binary for the CI Node version
node-sass ships per-Node-version native binaries. A newer runner Node has no matching binary, so it falls back to a source build that fails.
LibSass is deprecated
LibSass (and node-sass) is no longer maintained and lacks current Sass features. dart-sass is the reference implementation.
How to fix it
Swap node-sass for sass
- Uninstall node-sass and install sass.
- Most loaders (sass-loader, vite) auto-detect sass - no further config needed.
- Commit the updated lockfile.
npm uninstall node-sass
npm install -D sassPin the implementation if a loader guesses wrong
- Tell sass-loader to use the dart implementation explicitly.
// webpack.config.js (sass-loader options)
{ loader: 'sass-loader', options: { implementation: require('sass') } }How to prevent it
- Standardize on
sass(dart-sass); never reintroduce node-sass. - Pin the runner Node version so binary-compatibility surprises do not appear on upgrades.