2

Please look into it as it is not working for me:

npm warn invalid config proxy http://'Accenture\username:userpassword@2017'@127.0.0.1:8080 npm warn invalid config Must be a full url with 'http://'

Terry Barriff
  • 465
  • 3
  • 17
kmrrakesh
  • 137
  • 1
  • 1
  • 7

2 Answers2

6

Finally i got the issue resolved with the help from network guy

strict-ssl=false
proxy = http://ip address of proxy:8088
https-proxy = https://ip address of proxy:8088 
registry = http://registry.npmjs.org/

These settings should go in ~/.npmrc, or in /root/.npmrc if you need to use sudo.

D at T
  • 3
  • 2
kmrrakesh
  • 137
  • 1
  • 1
  • 7
5

If you wish to change any of the configuration properties in npm, the section on config on npmjs.com is useful: https://docs.npmjs.com/cli/config

The full proxy configuration for npm is

npm config set http-proxy http://username:password@proxy-address.com:80/'
npm config set https-proxy http://username:password@proxy-address.com:80/'

That should work for you, you can also double check it's set by typing npm config list

http-proxy = "http://username:password@proxy-address.com:80/"
https-proxy = "http://username:password@proxy-address.com:80/"

Further to that, if you prefer to edit the config file directly it is stored in a file called .npmrc that can be added either to each project root or the global settings in your user directory, please see the npmrc help content https://docs.npmjs.com/files/npmrc

In relation to your question, if your password contains special characters, they need to be escaped. This url provides useful information on special characters: http://www.cyberciti.biz/faq/unix-linux-export-variable-http_proxy-with-special-characters/

As an example, if your password were P@ssword then it will become P%40ssword.

Terry Barriff
  • 465
  • 3
  • 17