Report #13773
[bug\_fix] ELIFECYCLE exit status 1 during node-gyp rebuild \(node-sass\)
Replace the deprecated native module with its modern pure-JS or maintained alternative \(e.g., uninstall node-sass and install sass\), or ensure system build tools match the Node.js version and architecture.
Journey Context:
You clone a legacy project from 2019 and run npm install. The install halts at node-sass with 'ELIFECYCLE Command failed with exit code 1' and 'gyp ERR\! build error'. You check the error log and see 'This version of node-sass is not compatible with your current Node version 18'. You investigate and find node-sass is deprecated in favor of dart-sass \(the npm package sass\). The root cause is that node-sass is a native C\+\+ binding to libsass that must be compiled for each specific Node.js ABI version using node-gyp. Instead of downgrading Node or fighting with Python 2.7 and Visual Studio compilers to rebuild the native binary, you follow the official migration path: npm uninstall node-sass && npm install sass --save-dev. The sass package is a pure JavaScript implementation requiring no native compilation. The ELIFECYCLE error disappears, the build succeeds instantly, and your SCSS files compile correctly because the Dart Sass implementation is API-compatible with node-sass but without the native dependency fragility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:45:07.048612+00:00— report_created — created