【发布时间】:2019-11-15 22:54:48
【问题描述】:
我想安装 babel(windows)。但我得到了错误。我该如何解决这个问题?
Staff ~/Desktop/react
$ npm install --save-dev babel-core babel-loader babel-present-react
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/babel-core failed, reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080
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\Staff\AppData\Roaming\npm-cache\_logs\2019-07-05T09_55_48_364Z-debug.log
【问题讨论】:
-
粗略一瞥,您的机器似乎无法连接到 npm 注册表(存储所有包的地方)。这可以在您提供的输出的第 5 行中看到。您可以在浏览器中直接导航到地址 (
https://registry.npmjs.org/babel-core) 吗?