Report #83108
[bug\_fix] npm ERR\! code ELIFECYCLE \| npm ERR\! errno 1 \| node-sass postinstall: \`node scripts/build.js\` \| Failed at the node-sass postinstall script
Uninstall node-sass and install sass \(Dart Sass\) instead, or downgrade Node.js to a version compatible with the specific node-sass version \(see node-sass version table\). Root cause: node-sass is deprecated and binds to specific Node.js ABI versions; it often fails to download prebuilt binaries or compile for newer Node versions.
Journey Context:
Developer joins a project from 2019 that uses node-sass to compile SCSS. Running npm install on their Node.js 18 environment fails during the postinstall phase with ELIFECYCLE. The error log shows node-sass trying to build bindings for Node 18 but failing because node-sass v4 only supports up to Node 14. Developer considers using nvm to switch to Node 14, but instead checks the node-sass GitHub repo and sees it's deprecated in favor of sass \(Dart Sass\). Developer runs npm uninstall node-sass && npm install sass --save-dev. The sass package is pure JavaScript and installs instantly without native compilation. Updating the build scripts to use sass instead of node-sass works identically because sass implements the same JavaScript API. This permanently resolves the ELIFECYCLE error by removing the deprecated native dependency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:05:20.095739+00:00— report_created — created