尝试通过NPM安装样式组件时的网络错误
嗨,大家好,我正在努力建立环境。我已经从
开始了一个React项目,
npx create-react-app PROJECTNAME
我现在正在考虑使用样式的组件。但是,当我尝试使用
npm i --save styled-components
时获取此错误:
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/styled-components failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:443
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\nicho\AppData\Local\npm-cache\_logs\2022-05-05T23_33_02_048Z-debug-0.log
我不使用代理,其他所有内容都可以在我的网络中正常工作。
Hi guys, I have am trying to get my environment set up. I have started a React project with
npx create-react-app PROJECTNAME
I am now looking into using Styled Components. However when I attempt to install it with npm using this command
npm i --save styled-components
I get this error:
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/styled-components failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:443
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\nicho\AppData\Local\npm-cache\_logs\2022-05-05T23_33_02_048Z-debug-0.log
I am not using a proxy and everything else is working fine with my network.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用以下终端命令:CD ProjectName转到React App目录
go to the react app directory by using these terminal command : cd PROJECTNAME