Reputation: 307
I am behind a business proxy and when I do npm i -g npm
to update my npm it respond :
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to http://registry.npmjs.org/npm failed, reason: write EPROTO 101057795:error:140770FC:SLL routines:SSL23_GET_SERVER_HELLO:unknow protocol:openssl/ssl/s23_clnt.c:825:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\username\AppData\Moaming\npm-cache\_logs\2018-01-23T08_15_17_061Z-debug.log
Here is the npm config:
proxy=http://proxy.###.intra:8080/
https-proxy=https://proxy.###.intra:8080/
registry=http://registry.npmjs.org/
Any help would be appreciate :)
Thanks.
Upvotes: 8
Views: 25972
Reputation: 1029
This kind of error can be occur because of proxy you use for network. Even you add proxy settings to your PC that is not enough for work with npm. So you have to config proxy setting manually to work with npm.
npm config set proxy http://username:password@proxy_name:port
Here username is the user name you use to connect network and password is its password. Proxy name is the name of proxy or connection that you use in PC. and port is the proxy runnig port in your PC, like 8080.
Upvotes: 0
Reputation: 2534
You can add proxy using command line also:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8181
npm config set registry https://registry.npmjs.org/
You can then check settings using:
npm config ls -l | grep prox
Sometimes, the SSL also create problem, you can run the following:
npm config set strict-ssl false
Check your proxy port, the http and https proxy port should be different.
Upvotes: 8
Reputation: 2708
The real problem was with creation of symlinks containing ../
Add this in command line to update your npm config :
npm config set bin-links false
Upvotes: -2