Report #92969
[bug\_fix] npm ERR\! code ELIFECYCLE node-sass postinstall: \`node scripts/build.js\` failed
Replace node-sass with sass \(Dart Sass\), or use Rosetta 2 on Apple Silicon. Do not attempt to build node-sass from source. Root cause: node-sass is deprecated and doesn't provide prebuilt binaries for M1/M2 Macs or Node 16\+, forcing unreliable source compiles.
Journey Context:
Developer gets a new M1 Mac, clones a legacy project using node-sass v4.14.1. npm install crashes during the postinstall script with ELIFECYCLE. The error log shows 'Binding not found for darwin-arm64-83' and attempts to compile from source using node-gyp, which fails with C\+\+ compilation errors. The developer spends hours trying to fix node-gyp with Python and Xcode tools, but the real issue is that node-sass v4 predates M1 support. Checking the node-sass GitHub, they discover it's deprecated in favor of Dart Sass. They uninstall node-sass, install the sass package \(npm uninstall node-sass && npm install sass --save-dev\), and update their webpack config if necessary. The project now builds instantly without native compilation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:38:15.782156+00:00— report_created — created