0

I'm running Ubuntu 16.04 I have proxy setup on ~/.npmrc, which looks like the following config

registry="http://registry.npmjs.org/"
proxy="http://username:password@proxyconfig:port"
strict-ssl=false
http-proxy="http://username:password@proxyconfig:port"
http_proxy="http://username:password@proxyconfig:port"
https_proxy="http://username:password@proxyconfig:port"
https-proxy="http://username:password@proxyconfig:port"

I keep on getting the following exception, everytime I try to download any dependency.

exception

Full Error log

enter image description here

user2875912
  • 109
  • 2
  • 10

3 Answers3

2

This error means that cannot open http://registry.npmjs.org/jquery url.

For checking this, you can paste this http://registry.npmjs.org/jquery url into browser to see whether succeed to request data.

If so, possilbly your network or DNS has problem.

2

Well, if the browser works, then its related to the proxy settings and the proxy actually functions. Is the proxy requiring an authentication? I found that sometimes passwords can contain special characters that break the proxy settings string in the config file.....

Peter Branforn
  • 1,679
  • 3
  • 17
  • 29
1

Bound to be proxy issues.

set proxy settings:

npm config set proxy http://proxy.company.com:8080

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

check proxy settings:

npm config --global list

npm config list

if you have a bunch of people who need the same proxy settings then you can set the proxy config in an .npmrc file

Here's the output of npm config --global list for me (I'm behind a proxy):

; cli configs
global = true
user-agent = "npm/3.10.10 node/v6.12.0 win32 x64"

; userconfig D:\Users\DDLewis\.npmrc
http-proxy = "http://MYPROXYIPADDRESS:MYPROXYPORT"
https-proxy = "http://MYPROXYIPADDRESS:MYPROXYPORT/"
proxy = "http://MYPROXYIPADDRESS:MYPROXYPORT/"
registry = "http://registry.npmjs.org/"

; builtin config undefined
prefix = "D:\\Users\\DDLewis\\AppData\\Roaming\\npm"

Also see https://jjasonclark.com/how-to-setup-node-behind-web-proxy/

Zoe
  • 27,060
  • 21
  • 118
  • 148
danday74
  • 52,471
  • 49
  • 232
  • 283