npm -v和node-v都可以打印出来
但是 npm install就报错!
PHP中文网2017-04-17 14:48:13
run npm config get proxy
See what you get
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
Have you enabled global proxy?
巴扎黑2017-04-17 14:48:13
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 sourcenpm install -g express --registry=https://registry.npm.taobao.org