当前位置:网站首页>npm run serve starts error npm ERR Missing script "serve"
npm run serve starts error npm ERR Missing script "serve"
2022-07-30 06:33:00 【m0_67401382】
When starting the project, I found the following error with npm run serve
npm ERR! Missing script: "serve"npm ERR!npm ERR! To see a list of scripts, run:npm ERR! npm runnpm ERR! A complete log of this run can be found in:npm ERR! D:oderepspm_cache_logs?2-04-24T03_27_08_348Z-debug.logThe solution is this
First look at the first line of the error Missing script: "serve" means that there is no serve this startup script
Then I went to the package.json file to find it
No, there is the following dev

Then I tried to start the project with npm run dev and it worked!
By the way, you should also be curious about the difference between npm run serve and npm run dev.
Actually, npm run dev is used by vue-cli2.0, and npm run serve is used by vue-cli3.0
In essence, it is caused by different versions of vue-cli scaffolding
边栏推荐
猜你喜欢
随机推荐
搞懂redux一篇就够了
CTF之misc-日志分析
mysql间隙锁失效?
async/await用法详解
简述SSRF
2022CISCNmisc
js方法 reduce 用法
phpok网站漏洞利用分析
String类型字符串获取第一次或者最后一次出现的下标
你怎么看待scanf()中%d的“吃空白”行为?
[HCTF 2018]admin
TypeError The view function did not return a valid response. The function either returned None 的解决
社区版idea 最右侧没有Database怎么办
C语言指针(指针数组、数组指针、函数指针、传参、回调函数等)超详细
CTF之misc-内存分析(Volatility)
MySQL-Explain详解
典型线程问题综合演示
DVWA installation tutorial (understand what you don't understand · in detail)
uni-app:关于自定义组件、easycom规范、uni_modules等问题
strlen和sizeof的区别


![Art-template 中文文档[详细篇]](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)





