报错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?的解决办法

 

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

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/115317.html<

(0)
运维的头像运维
上一篇2025-02-18 01:43
下一篇 2025-02-18 01:45

相关推荐

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注