npm install error/issue

前端 未结 3 1716
心在旅途
心在旅途 2020-12-12 02:04

I have already set proxy configurations in .npmrc file. Executing the npm install command gives me error as follows\"

$ npm install npm ERR! Windows_

相关标签:
3条回答
  • 2020-12-12 02:32

    first give the command and check if proxy is set,npm config get proxy if not set do the following from command prompt

    npm config set proxy http://username:password@proxy address:8080 npm config set https-proxy http://username:password@proxy address:8080

    and if password contains '@'in password, then replace it with '%40'

    0 讨论(0)
  • 2020-12-12 02:37

    Someone who comes from china may solve this problem by using Taobao mirror.

    npm --registry=https://registry.npm.taobao.org install

    0 讨论(0)
  • 2020-12-12 02:47

    Does your proxy URL have '@' symbol in it? @ symbol separates the user ID and password from the URL. If it does, you can try using '%40' to replace it.

    Also, it is https-proxy not http_proxy.

    A correct config would look like -

    registry=https://registry.npmjs.org/
    proxy=http://username:password@proxydomain:8080/
    https-proxy=https://username:password@proxydomain:8080/
    

    https://docs.npmjs.com/misc/config#proxy

    0 讨论(0)
提交回复
热议问题