Install Node.JS and npm behind a firewall / company proxy - Galen Framework




Problem: Unable to install npm behind the proxy

Solution: Similar to what we did when we installed git http://go-gaga-over-testing.blogspot.com.au/2015/04/setup-github-within-companys-firewall.html behind a company's firewall we shall edit the config settings for Node


  1. The best way to install npm is to install node using the node.js installernpm is installed as part of node.
  2. The problem occurs when you clone the Node repository from Github
  3. npm uses a configuration file and it can be added to via the command line npm config set ...
  4. To get packages behind a proxy
    1. npm config set strict-ssl false
    2. npm config set registry "http://registry.npmjs.org/"
    3. npm config set proxy http://"username:password"@proxy:8080
    4. npm config set https-proxy http://proxy-server-address:8080 
Update: Try changing to npm config set registry "https://registry.npmjs.org/"

Update:

You can skip the username password and just hardcode the proxy and registry URL so that npm wouldn’t have to look for it, so in the end, I had an .npmrc that looked like this:

proxy=http://proxy details:8080
https_proxy=http://proxy details:8080
strict-ssl=false
ca=null
registry=http://registry.npmjs.org/

And If you are installing the Galen Framework on Windows just like me then use the manual installer:
http://blog.teamtreehouse.com/install-node-js-npm-windows

Comments

  1. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    node.js development services

    ReplyDelete
  2. It's great to come across a blog once in a while that's not the same outdated material. Really glad that I came across your post. Keep us updated.
    Node JS Online training
    Node JS training in Hyderabad

    ReplyDelete
  3. great info about hadoop in this blog At SynergisticIT we offer the best hadoop training in california

    ReplyDelete
  4. Thank you for sharing this informative content. Looking forward to reading more.
    Best Web Development Services

    ReplyDelete

Post a Comment

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?