【问题标题】:NPM does not allow installation of any packages like reactNPM 不允许安装任何包,比如 react
【发布时间】:2020-04-16 13:30:20
【问题描述】:

我一直在尝试在我的 PC 上安装 react。问题是它总是显示以下错误:

D:\React JS>npm install react
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/react failed, reason getaddrinfo ENOTFOUND host
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly,  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Idea1\AppData\Roaming\npm-cache\_logs\2020-04-16T12_57_52_202Z-debug.log

这是我尝试安装 react 或任何其他软件包时的问题。

【问题讨论】:

    标签: node.js npm npx


    【解决方案1】:

    尝试:

    npm config delete proxy
    

    然后安装命令

    【讨论】:

    • 不,兄弟,我没有使用任何代理
    猜你喜欢
    • 1970-01-01
    • 2018-09-08
    • 1970-01-01
    • 2018-05-26
    • 1970-01-01
    • 2018-10-28
    • 2021-01-27
    • 2021-08-01
    • 1970-01-01
    相关资源
    最近更新 更多