node-sass won't compile on Python 3 systems (e.g. EL8) due to node-gyp dependency lock

Created on 25 Mar 2020  路  7Comments  路  Source: sass/node-sass

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 version (npm -v):
  • Node version (node -v):
  • Node Process (node -p process.versions):
  • Node Platform (node -p process.platform):
  • Node architecture (node -p process.arch):
  • node-sass version (node -p "require('node-sass').info"):
  • npm node-sass versions (npm ls node-sass):
BLOCKED npm build

Most helpful comment

Indeed, fixed in https://github.com/sass/node-sass/commit/15886f081b585fd784c9ab6a5b9ad36aba7105a4, now we just need a release :)

All 7 comments

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"
    }

There were only 5 commits to the v5 branch this year.

I would suggest that node-sass is truly dead, and Dart sass (npm:sass) is the new official sass implementation (which does not depend on node-gyp or python2).

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  38Comments

noraj picture noraj  路  74Comments

matt3224 picture matt3224  路  39Comments

danez picture danez  路  39Comments

robcalcroft picture robcalcroft  路  40Comments