Hi,
I'm trying to install node-sass via NPM. Sadly I'm behind a corporate proxy and when it tries to download the windows binding from https://github.com/sass/node-sass/releases/download/v3.4.2/win32-ia32-14_binding.node, it can't because the proxy will block the file for being a binary.
Is there any option to provide this file from somewhere else? I think it should be no problem to get this file once in some other way and put it into some directory, but I have no idea how to make npm look for it there. Is this possible?
Cheers and thanks in advance
You can config npm to use your proxy settings.
I know, the proxy settings are not the issue, npm is talking fine to the internet.
However, the proxy also acts as an anti-virus and will block "malicious" files (which basically means everything it considers an executable). That's why I'm asking how to only provide this specific file differently.
As documented on the homepage of this project there options to configure where the binary is downloaded from.
ok, clearly need to work on my rtfm skills. thank you, that works!
# in ~/.npmrc
registry=http://registry.npmjs.org/
proxy=http://localhost:8088/
http-proxy=http://localhost:8088
https-proxy=http://localhost:8088/
strict-ssl=false
unsafe-perm=true
# https://medium.com/@mallim/how-to-use-node-sass-in-a-closed-environment-859880720f2a
# OR sudo npm config set sass-binary-site=https://npm.taobao.org/mirrors/node-sass --global
npm install --save-dev node-sass --sass-binary-site=https://npm.taobao.org/mirrors/node-sass
Most helpful comment
As documented on the homepage of this project there options to configure where the binary is downloaded from.