[npm install [email protected]命令给出了ENETUNREACH错误

问题描述 投票:0回答:1

my ubuntu terminal

我成功使用了create-react-app命令,并且npm start命令起作用。但是,当我尝试使用npm install [email protected] --save安装引导程序时,出现了“ ENETUNREACH”错误。我正在使用npm 5.8.0,nodejs 10.15.2和Ubuntu 19.10 P.S.我是一个完整的初学者,并且正在关注在线React课程。

node.js reactjs npm react-bootstrap
1个回答
0
投票

似乎您在代理之后,您可以这样做

npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/

如果存在代理服务器,前两行将删除代理服务器。

第三行将从官方软件包注册表中下载npm。

这是您可以在using NPM Install Behind A Corporate Proxy Server 上阅读的文章

似乎当前安装的npm与您使用的Node.js版本不兼容。您可能需要使用

更新npm
npm install npm@latest -g
© www.soinside.com 2019 - 2024. All rights reserved.