If the above return is not empty, npm config set proxy null or npm config delete proxy, by the way, turn off the https proxy npm config set https-proxy null. If there is a certificate problem, turn off the verification of the certificate npm config set strict-ssl false, of course the above You don’t need to type all the commands. According to the error message, select the corresponding solution, and then try again
If the command 1 is empty, check if there is HTTP_PROXY in your environment variable
Whether the computer has a proxy enabled, causing the certificate to not be trusted by npm. It is recommended that you turn off the proxy and try using Taobao mirror source npm install -g express --registry=https://registry.npm.taobao.org
run
npm config get proxy
See what you getIf the above return is not empty,
npm config set proxy null
ornpm config delete proxy
, by the way, turn off the https proxynpm config set https-proxy null
. If there is a certificate problem, turn off the verification of the certificatenpm config set strict-ssl false
, of course the above You don’t need to type all the commands. According to the error message, select the corresponding solution, and then try againIf the command 1 is empty, check if there is HTTP_PROXY in your environment variable
Have you enabled global proxy?
Whether the computer has a proxy enabled, causing the certificate to not be trusted by npm. It is recommended that you turn off the proxy and try using Taobao mirror source
npm install -g express --registry=https://registry.npm.taobao.org
Network problem, it is recommended to use cnpm
Network problems
1. Use Taobao source (cnpm)
2. vpn ss
How did you solve it? I encountered the same problem