首页  >  问答  >  正文

创建VueJS项目后运行npm install时出现错误

我刚刚安装了 VueJS,并尝试创建一个项目。我按照他们的安装和快速入门指南 VueJS Getting Started 进行操作。

> npm init vue@latest

> cd(这里是我的项目名称)

> 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\_logs22-04-07T08_54_47_537Z-debug-0.log

我该如何解决这个问题?我这样做错了吗?

P粉161939752P粉161939752236 天前373

全部回复(1)我来回复

  • P粉985686557

    P粉9856865572024-02-26 10:58:52

    请尝试此链接,它看起来已经得到答复

    npm 错误!尝试获取 https://registry.npmjs.org/react-is 时响应超时(超过 30000 毫秒)

    回复
    0
  • 取消回复