Pengwin icon indicating copy to clipboard operation
Pengwin copied to clipboard

Error installing Node-Sass binaries on Pengwin

Open MikeShiner opened this issue 6 years ago • 4 comments

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):

  1. 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
  2. create syslink for node/npm/npx to /usr/bin
  3. Add node to PATH (in ~/.profile)
  4. export PATH=/usr/local/lib/nodejs/node-v10.15.3-linux-x64/bin:$PATH
  5. 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: image

npm -v: 6.9.0 node -v: 10.15.3

This is what Pengwin outputs:

image

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

MikeShiner avatar Apr 26 '19 08:04 MikeShiner

When we can we will take a look at the issue upstream and see if we can lend a hand.

sirredbeard avatar Apr 27 '19 04:04 sirredbeard

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.

patrick330602 avatar Apr 27 '19 13:04 patrick330602

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.

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)

  1. Remove previous Node installation
  2. Install NPM from Debian package manager (sudo apt-get install npm) - Npm is installed under /usr/lib so will require sudo.
  3. Set global prefix to somewhere you have write access to. /usr/lib/nodejs/npm config set prefix ~/.npm-global
  4. Install n sudo npm i -g n
  5. Rewrite node/npm sysmlinks in /usr/bin to `
  6. Install Node-Sass /usr/local/n/versions/node/10.15.3/bin/npm i node-sass

image

MikeShiner avatar Apr 27 '19 17:04 MikeShiner

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

crramirez avatar Jun 11 '19 21:06 crramirez