Node-sass: Installing node-sass with the binding blocked by corporate proxy

Created on 21 Apr 2016  路  5Comments  路  Source: sass/node-sass

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

Most helpful comment

As documented on the homepage of this project there options to configure where the binary is downloaded from.

All 5 comments

You can config npm to use your proxy settings.

http://jjasonclark.com/how-to-setup-node-behind-web-proxy/

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

amarbham picture amarbham  路  3Comments

liuyuqiang picture liuyuqiang  路  3Comments

NathanKleekamp picture NathanKleekamp  路  4Comments

Rudloff picture Rudloff  路  3Comments

tjistooshort picture tjistooshort  路  4Comments