The current version of node-sass is locked to the 3.8.0 stream of node-gyp. This version of node-gyp does not support Python 3 only environments such as Enterprise Linux 8.
This support was added to node-gyp starting at version 5.0.0. See:
https://github.com/nodejs/node-gyp/pull/1582
Example compilation output:
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/usr/lib/node_modules/node-gyp/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/lib/node_modules/node-gyp/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/lib/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/lib/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/lib/node_modules/node-gyp/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/lib/node_modules/node-gyp/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:158:21)
npm -v):node -v):node -p process.versions):node -p process.platform):node -p process.arch):node -p "require('node-sass').info"):npm ls node-sass):This fix is available in the v5 branch.
Indeed, fixed in https://github.com/sass/node-sass/commit/15886f081b585fd784c9ab6a5b9ad36aba7105a4, now we just need a release :)
We hit this on OpenBMC when trying to move up our meta-oe layer, which drops support for Python 2 and is Python 3 only. Any update of when a release with this fix will happen? I see this fix is in the v5 branch, would you consider pulling this fix into a version 4 release?
Thank you!
Gunnar
There's a workaround using _yarn_ until v5 is released:
"resolutions": {
"**/node-gyp": "^7.0.0"
}
Run into this as well as part of python2.7 being dropped from our systems. Does the master-branch not build with later versions or why can it not be bumped there as well?
This effectively kills node-sass package until either v5 is released or node-gyp is bumped.
also having this issue. It's really frustrating to have to install a deprecated language to use this when the version could just be bumped.
Most helpful comment
Indeed, fixed in https://github.com/sass/node-sass/commit/15886f081b585fd784c9ab6a5b9ad36aba7105a4, now we just need a release :)