Issue
We are building a React app, with webpack, and I am using sass-loader which in turns it is using node-sass to convert SCSS into css.
The problem is that node-sass uses only python2.7, and I am working in a big company where they have extremely restricted policies on developer machines, where they allow only python3.x.
In order to install python2.7 I need to request an exception, which will goes to the company IT headquarter.
Is there an alternative for Node-sass that doesn't require python2.7?
Solution
node-sass does not require Python 2. Building native modules in Node.js does require Python 2 https://github.com/nodejs/node-gyp. node-sass ships prebuilt bindings for supported platforms https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick-guide-for-minimium-support so you should only need Python to rebuild if your network blocks downloading those files from the GitHub releases or you're running old node-sass + new Node.js versions.
If that doesn't work for you, Dart-Sass can sometimes be used as an option in those tools https://github.com/sass/dart-sass
Answered By - nschonni
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.