After running the compose command, I see everything install correctly here:
Installing roots/sage (9.0.9)
Installing roots/sage (9.0.9): Loading from cache
Then when I try to run the yarn command, I see the error:
error node-sass: Command failed.
Command: node scripts/build.js
Arguments:
Directory: \node_modules\node-sass
gyp info using node-gyp@3.8.0
gyp info using node@12.18.0 | win32 | x64
gyp verb check python checking for Python executable “python2” in the PATH
gyp verb which failed Error: not found: python2
Do I really have to install python on my system? Why is this not listed as a dependency on the install guide for Sage 9?
IIRC your problem is that node-sass wants Python to compile itself. You can switch to the version compiled from Dart Sass (which is the new “official” implementation and pure JavaScript) and avoid that error (and presumably the need for Python): https://www.npmjs.com/package/sass
Thanks for your reply. I just tried everything with a completely fresh install of Windows 10 and got the same error on a different machine.
How exactly do you “switch to the version compiled from Dart Sass” ? I added dart-sass to my package.json file but not sure what the next steps would be. I get a “node-sass” not found when doing this.
I’ve just encoutered the same issue during install on my Windows 10 machine.
Node: 12.16.2
NPM: 6.14.4
PHP: 7.4.7
I was looking for an alternative solution because I didn’t feel like downgrading my node version or swapping node-sass in favour of dart-sass, when I came across this solution.
I did the following:
Deleted yarn.lock file and the node_modules directory
Updated package.json entry to the current version of node-sass: "node-sass": "~4.14.1"
Built the project again using yarn && yarn build
Suddenly, the compilation process finished successfully.