Report #92568
[bug\_fix] ELIFECYCLE node-sass postinstall failed
Uninstall node-sass and install sass \(Dart Sass\) instead: npm uninstall node-sass && npm install sass --save-dev. Update any @import syntax to @use if needed. Root cause: node-sass is deprecated and LibSass \(the C\+\+ implementation\) is unmaintained; it often fails on newer Node.js versions or Apple Silicon.
Journey Context:
CI build suddenly fails with ELIFECYCLE during the node-sass postinstall script. The error log shows 'gyp ERR\! build error' and 'node-sass build failed'. Checked Node.js version and realized upgraded to Node 18, but node-sass 6.x doesn't support Node 18. Looked at node-sass GitHub and saw the deprecation notice: 'Node-sass is deprecated. Please use dart-sass \(npm package 'sass'\) instead'. Removed node-sass from package.json, installed the 'sass' package \(which is pure JavaScript, no native bindings\), changed the Sass import in webpack config from node-sass to sass, and the build succeeded without any native compilation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:57:53.209633+00:00— report_created — created