npm ERR! network getaddrinfo ENOTFOUND

前端 未结 17 993
傲寒
傲寒 2020-12-02 18:12

I am getting npm ERR! network getaddrinfo ENOTFOUND error while trying to install any package using NPM. I know there are numerous threads on the same issue but

17条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 18:47

    The solution which worked for me:

    1. Delete proxy: npm config delete proxy
    2. Check npm config get proxy which should return null

    Now, check if you are able to install the package. If not working, try manually editing the config, type: npm config edit, remember you are in VI editor.

    Add ; before(for commenting out): npm config set proxy http://proxy.company.com:8080 npm config set https-proxy http://proxy.company.com:8080

    Save and exit the file :x

    Now, try installing the packages. It should work.

提交回复
热议问题