您的位置:首页 > Web前端 > Vue.js

跑vue项目的时候,报错 ENOENT: no such file or directory(This is related to npm not being able to find a file)

2019-05-23 10:28 3339 查看

在跑项目的时候,报错ENOENT: no such file or directory(This is related to npm not being able to find a file)和This is probably not a problem with npm,there is likely additional logging output above
出现这种错误的原因可能有两种:
1、可能是依赖包出现了问题,即node_modules里面的某个依赖可能没有被程序识别出来。解决办法:
在文件夹中找到工程目录,然后找到如下的文件夹然后强制删除,之后打开PowerShell窗口,重新执行 npm install 命令。

2、也可能是版本更新的原因。解决方法:
执行完 npm install 命令后,再执行 npm i -D webpack-dev-server@2.9.7 命令。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐