407 Authentication Required Npm


Answer :

I recommend reading through this article to configure the proxy for npm. http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/

  • npm config set proxy http://proxy.company.com:proxyport

  • npm config set http-proxy http://proxy.company.com:proxyport

  • npm config set https-proxy http://proxy.company.com:proxyport

Hope this is useful for you!


Usually, when you are behind a corporate proxy, it is needed to add the domain where you are at. Given that also the characters should be URL encoded, it would look like:

https://domain%5Cusername:password@proxy:port


We should add proxy with username and password to avoid this error. For example:

  • username: admin
  • password: admin123
  • proxy: 172.10.3.21
  • port: 3128

npm config set proxy http://admin:admin123@172.10.3.21:3128 npm config set https-proxy http://admin:admin123@172.10.3.21:3128 

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable