Skip to content
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

Does not compile anymore in a Python 3 environment #670

Open
dmoklaf opened this issue Feb 28, 2021 · 2 comments
Open

Does not compile anymore in a Python 3 environment #670

dmoklaf opened this issue Feb 28, 2021 · 2 comments

Comments

@dmoklaf
Copy link

dmoklaf commented Feb 28, 2021

Python 2 is now deprecated. In a Python 3 environment the "npm install" command fails as it tries to run node-gyp in a deprecated (from the Python 2 era) 3.8 version (instead of 7.1.2) against the Python 3 interpreter.

Closer inspection reveals the wrong installed version of node-gyp is due to the node-sass component which is itself installed in an old version by the gulp-sass component. One solution could be to have gulp-sass upgrade its node-sass dependency:
dlmanning/gulp-sass#782

However this ticket has been in limbos for 2 months, and node-sass is deprecated anyway - it recommends now to use node-dart-sass which is the now target environment to compile sass files. I suspect it explains why gulp-sass has received no updates, in favor of gulp-dart-sass.

A clean solution is consequently for Spectre to depends on gulp-dart-sass instead of gulp-sass. It requires only to update the packages.json and gulpfile.js files.

I noticed it also accelerates considerably the build times as node-sass had a very heavy and lengthy C++ compilation stage, that is now instantaneous thanks to dart.

@dmoklaf dmoklaf changed the title Does not compile any more in a Python 3 environment Does not compile anymore in a Python 3 environment Feb 28, 2021
@dmoklaf
Copy link
Author

dmoklaf commented Mar 9, 2021

I could contribute the patch if the principle (replacing gulp-sass with gulp-dart-sass) is validated. It has been running smoothly for 9 day now, across many rebuilds, without any issue.

@dmoklaf
Copy link
Author

dmoklaf commented May 25, 2021

Hello, is there any interest in this? Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant