Pengwin
Pengwin copied to clipboard
Error installing Node-Sass binaries on Pengwin
Describe the bug Node-Sass is a dependency of the Angular framework (https://github.com/sass/node-sass). I am trying to install NPM dependencies but node-sass will fail executing the binary downloaded for it.
I've raised an issue with the guys over at Node-Sass (https://github.com/sass/node-sass/issues/2641) who believe it's a WSL-specific error.
I've since confirmed that it works perfectly fine on my Ubuntu distribution. So, unfortunately, I believe Debian/Pengwin issue.
This is a deal breaker - I'll have to switch back to Ubuntu in the meantime. :( I'm happy to try anything you suggest. Thanks in advance for your help.
Steps I followed to get here (See above Github Issue):
- NodeJs from Linux Binary as per these instructions:
https://github.com/nodejs/help/wiki/Installation
which node/usr/local/lib/nodejs/node-v10.15.3-linux-x64/bin/node - create syslink for node/npm/npx to
/usr/bin - Add node to PATH (in ~/.profile)
export PATH=/usr/local/lib/nodejs/node-v10.15.3-linux-x64/bin:$PATH- set npm config prefix to
/home/mike/.npm-global
Install Node-Sass:
mkdir temp1
cd temp1
npm i node-sass
Expected behavior
This is what Ubuntu outputs:

npm -v: 6.9.0
node -v: 10.15.3
This is what Pengwin outputs:

npm -v: 6.9.0
node -v: 10.15.3
Full NPM Log: 2019-04-25T21_46_52_466Z-debug.log
Pengwin Version 1.2.3.0
Windows Build 1803 (OS Build 17134.706)
OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.17134 N/A Build 17134 OS Manufacturer: Microsoft Corporation OS Configuration: Member Workstation OS Build Type: Multiprocessor Free BIOS Version: HP N75 Ver. 01.14, 12/04/2017
When we can we will take a look at the issue upstream and see if we can lend a hand.
I think this is possibly related to #365 . After some digging, your installation terminates right at the step of testing the binary, which is a problem similar to #365 (Checking md5 value in that issue). As I have tested, the n version of npm works without issue, which you possibly want to try.
I think this is possibly related to #365 . After some digging, your installation terminates right at the step of testing the binary, which is a problem similar to #365 (Checking md5 value in that issue). As I have tested, the
nversion ofnpmworks without issue, which you possibly want to try.
Awesome. Thanks for the tip! This workaround will do for now. I managed to get node-sass installed using npm installed with the n package.
I previously did have issues with Node-Sass downloading binding for a package-lock dependency version that referenced Node 9. It's supposed to download the latest for binding for your machine but it was guessing incorrectly and was hitting a 404 error from Github. So this does sound like it could be related.
Steps for the workaround (for reference)
- Remove previous Node installation
- Install NPM from Debian package manager (
sudo apt-get install npm) - Npm is installed under /usr/lib so will require sudo. - Set global prefix to somewhere you have write access to.
/usr/lib/nodejs/npm config set prefix ~/.npm-global - Install n
sudo npm i -g n - Rewrite node/npm sysmlinks in
/usr/binto ` - Install Node-Sass
/usr/local/n/versions/node/10.15.3/bin/npm i node-sass

npm i node-sass works right if npm is installed using pengwin-setup. Please if someone can test.