我刚刚安装了VueJS,并尝试创建一个项目。我跟踪了它们的安装和快速启动指南VueJS开始了。
> npm init vue@latest
> cd (My Project Name Here)
> npm install
但是,执行> npm install后,它将在VSCode终端中返回以下消息:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/lodash: Socket timeout
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\alscg\AppData\Local\npm-cache\_logs\2022-04-07T08_54_47_537Z-debug-0.log我该怎么解决这个问题?我做错了吗?
发布于 2022-04-07 09:06:04
请试一下这个链接,它看起来已经回答了。
国家预防机制错误!尝试获取https://registry.npmjs.org/react-is时响应超时(超过3000ms)
https://stackoverflow.com/questions/71779239
复制相似问题