npm install报错 npm ERR! enoent ENOENT: no such file or directory

执行npm install 或者 npm run dev/ npm start 报错

执行 npm install 和 npm run dev 的时候,出现这个报错,google之后 执行npm cache clean --force这个好了,就是没看懂是什么原因

可能是 npm install 的过程中出现了错误,没有正确的安装依赖,像 npm run dev 这类命令自然无法运行,除了

执行 npm cache clean --force 清除缓存,还可以尝试删除 package-lock.json,再运行 npm install。

参考https://vuejscaff.com/topics/92/will-both-npm-install-and-npm-run-dev-fail

你可能感兴趣的:(npm install报错 npm ERR! enoent ENOENT: no such file or directory)