node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

node-sass ignores --sass-binary-dir on command line

Open davewthompson opened this issue 5 years ago • 2 comments

Node-sass is ignoring the --sass-binary-dir on the command line, while running via Gitlab in a Cypress Docker image, and is trying to go to the Github URL.

Docker image is Node 12.

Output:

`$ ls -l /tmp/node total 3396 -rw-rw-rw- 1 root root 3474752 Sep 17 04:10 linux-x64-72_binding.node

$ npm i node-sass --sass-binary-dir=/tmp/node npm WARN deprecated [email protected]: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.

[email protected] install /builds/portfolioholdings/holdings-ui/node_modules/node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-72_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-72_binding.node":

read ECONNRESET

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

[email protected] postinstall /builds/portfolioholdings/holdings-ui/node_modules/node-sass node scripts/build.js`

davewthompson avatar Sep 17 '19 04:09 davewthompson

Can you try putting your binding in the following directory structure:

> find /tmp/node
/tmp/node
/tmp/node/linux-x64-72
/tmp/node/linux-x64-72/binding.node

saper avatar Oct 17 '19 01:10 saper

Can confirm - this worked for me.

Skyr avatar Nov 11 '19 12:11 Skyr