0712-2888027 189-8648-0214
微信公众号

孝感风信网络科技有限公司微信公众号

当前位置:主页 > 技术支持 > Javascript/JQuery > npm WARN Local package.json exists, but node_modules missing, did you mean to install?错误的解决方法

npm WARN Local package.json exists, but node_modules missing, did you mean to install?错误的解决方法

时间:2024-04-18来源:风信官网 点击: 4281次

客户的开发项目采用Vue开发,运行npm run dev命令报错如下:

> mix

'mix' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2022-07-07T03_20_04_511Z-debug.log

我们需要把依赖关系包更新一下才行

解决方法:npm install

运行完成之后,再次执行npm run dev

终于编译成功!

Laravel Mix v6.0.49

✔ Compiled Successfully in 1333ms
┌─────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────┬─────────┐

│ File │ Size

├─────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────┼─────────┤

│ /js/app.js │ 606 KiB

│ css/app.css │ 1 bytes

└─────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────┴─────────┘

webpack compiled successfully

热门关键词: npm Local package.json node_modules
栏目列表
推荐内容
热点内容
展开