If you are behind a proxy, set it correctly in npm.
>npm config set proxy http://proxyhost:proxyport
>npm config set https-proxy http://proxyhost:proxyport
Notes:
For SSL/https proxies, the protocol in URL should be http not https
If your set up is on a Docker/Vagrant instance or a hosted VM, use IP address instead of hostname for proxy as the later might not be resolvable.
If there is no proxy , remove proxy config from npm
>npm config set proxy null
>npm config set https-proxy null
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…