npm安装失败,可能是网络问题?

问题描述 投票:-2回答:1

我有一个完整的Vue项目。我尝试安装npm,但失败了。 npm版本是最新的。可能是网络问题吗?

错误:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be enter code herefound in:
npm ERR!     C:\Users\yaoshuangshuang\AppData\Roaming\npm-cache\_logs\2020-04-03T03_40_28_242Z-debug.log

Image

vue.js npm vue-cli
1个回答
0
投票

不,这不是网络问题。您可以尝试一些清洁方法。首先尝试

npm cache clean --force

然后尝试删除“节点模块”文件夹,然后重新安装它:(首先,在删除节点文件夹之前,请检查是否已编辑了某些组件或CSS)

  • delete node_modules folder
  • delete package-lock.json file
  • npm install

现在您不能再尝试npm run dev / npm run serve

© www.soinside.com 2019 - 2024. All rights reserved.