search

Home  >  Q&A  >  body text

node.js - 刚装上最新node,npm install报这个错误!求ndoe大神解答!!!


npm -v和node-v都可以打印出来
但是 npm install就报错!

PHP中文网PHP中文网2783 days ago642

reply all(5)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 14:48:13

    1. run npm config get proxySee what you get

    2. 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

    3. If the command 1 is empty, check if there is HTTP_PROXY in your environment variable

    4. Have you enabled global proxy?

    reply
    0
  • 巴扎黑

    巴扎黑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 source
    npm install -g express --registry=https://registry.npm.taobao.org

    reply
    0
  • PHPz

    PHPz2017-04-17 14:48:13

    Network problem, it is recommended to use cnpm

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:48:13

    Network problems
    1. Use Taobao source (cnpm)
    2. vpn ss

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 14:48:13

    How did you solve it? I encountered the same problem

    reply
    0
  • Cancelreply