npm ERR! Missing script: "serve" npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run
时间: 2023-08-27 21:16:36 浏览: 198
npm ERR! Missing script: "serve"
npm ERR!
npm ERR! To see a list of scripts, run: npm ERR! npm run
这个错误是由于在运行npm命令时,找不到对应的"serve"脚本。解决方法是在package.json文件中查找"scripts"字段,看是否存在"serve"脚本,如果不存在,可以添加一个"serve"脚本。例如,可以将"npm-run-dev"改为"npm-run-serve"或者将"dev"改为"serve"。然后再次运行npm run serve命令就可以解决这个问题了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [碎碎念:解决npm run dev /serve 报错](https://blog.csdn.net/yxiulian/article/details/126518934)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [npm run serve启动报错npm ERR Missing script: “serve](https://blog.csdn.net/qq_52372698/article/details/124378935)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文