Get Node.js npm command to work behind corporate proxy

Can try this....working for me.

  • Open IE (Chrome did not work for me).
  • Hit the URL http://registry.npmjs.org
  • it will download json output if successful.

Now go back to command prompt and try npm install.


I was able to get this working by installing a local proxy:

NPM behind NTLM proxy


Use fiddler http://www.telerik.com/fiddler Install and run and that's it, everything will run as it is supposed to. I spent half a day cracking my head on this Edit: I honestly have no idea if it was fiddler or something else I tried that fixed it (it is mostly the latter) but you should try setting registry, http-proxy, proxy and strict-ssl

When authentication is required for the HTTP proxy:

Fiddler can be configured to authenticate with the corporate HTTP proxy using NTLM or other protocols. Leave the existing auto authenticate options/rules defaults in place. Instead, go to this setting from the menu bar:

Tools > Telerik Fiddler Options > Connections tab

Click on the Allow remote computers to connect checkbox. You will see a dialog explaining the consequences of enabling this option. Restart Fiddler and update the .npmrc file as shown above. Whenever you need npm to access the registry site just run Fiddler. This setting won't affect the way Fiddler runs for other captures.

Tags:

Node.Js

Npm