New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-sass won't compile on Python 3 systems (e.g. EL8) due to node-gyp dependency lock #2877
Comments
This fix is available in the v5 branch. |
Indeed, fixed in 15886f0, 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! |
The version of node-gyp, ^3.8.0, used by node-sass does not support Python 3 only environments. Starting with node-gyp 5.0.0, support for Python 3 only was added. Added node-gyp 6.1.0 to package.json and edited the node-sass "requires" in package-lock.json to force node-sass to use this version. This problem can be seen if building an image or the webui recipe with the meta-oe and poky subtree bumps: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/31299 https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/31297 This poky refresh deprecates python2. From the mailing list: https://lists.ozlabs.org/pipermail/openbmc/2020-February/020421.html node-sass knows of this issue and has a fix, same fix as this, move node-gyp to 6.1.0, but that fix isn't in a release yet. Asked for a timeline of when a release with this fix will happen. This change can be removed after moving to a version of node-sass with this fix. sass/node-sass#2877 Considered using https://www.npmjs.com/package/npm-force-resolutions but required more packages and wasn't simple to make work. Modifying package-lock.json manually is not recommended but in this case until fixed upstream, not a better solution. Tested: Built for a Witherspoon and no regression. Was able to build the GUI with change and 31299 / 31297. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Change-Id: I514395ca0ae2fda6d46cb7a2a3e70cc5b92be58d
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. |
Avoids having to install Python 2: sass/node-sass#2877 Set sass-loader to 10.x instead of 11.x because it's incompatible with Vue 2: https://stackoverflow.com/a/66087132/10434371
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:
nodejs/node-gyp#1582
Example compilation output:
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
):The text was updated successfully, but these errors were encountered: