npm ERR! code E407 Proxy Authentication Required

前端 未结 1 2030
礼貌的吻别
礼貌的吻别 2021-01-22 12:15

While I am trying to run npm command, I am getting an error.

The error log is reproduced below:

0 info it worked if it ends with ok
1 verbose cli [ \'C:         


        
相关标签:
1条回答
  • 2021-01-22 12:38

    This error is most likely because you are behind a proxy, or may be you are in your organisation which uses proxy. To find the PROXY name and the PORT you need to do the following steps:
    1.go to run
    2.type "inetcpl.cpl"
    3.Go to Connection tab
    4. Go to LAN Setting There you will find address and the port

    After you get the "address" and the "port" replace it with "proxy_name" and "port" in the below command and replace "username" with "your username" and "password" with "your password" and run

    npm config set proxy http://username:password@proxy_name:port

    npm config set http-proxy http://username:password@proxy_name:port

    Afterwards run npm.

    This should work possibly

    Edit: Before running npm config the URL should be encoded and this can be done by just copy pasting the URL to this website https://www.urlencoder.io/

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