欢迎您光临自学哈网,只为分享网络知识教程,供大家学习参考!

「自学哈网」报错npm WARN Local package.json exists, but node_modules missing, did you mean to install?的解决办法

作者 : 自学哈 本文共1274个字,预计阅读时间需要4分钟 2023-04-26 共120人阅读
也想出现在这里? 联系我们

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

 

客户开发项目采用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

本站声明:
本站所有资源来源于网络,分享目的仅供大家学习和交流!如若本站内容侵犯了原著者的合法权益,可联系邮箱976157886@qq.com进行删除。
自学哈专注于免费提供最新的分享知识、网络教程、网络技术的资源分享平台,好资源不私藏,大家一起分享!

自学哈网 » 「自学哈网」报错npm WARN Local package.json exists, but node_modules missing, did you mean to install?的解决办法
也想出现在这里? 联系我们
© 2022 Theme by - 自学哈网 & WordPress Theme. All rights reserved 浙ICP备2022016594号