When running the Vue project today, an error was reported when running npm run dev as shown below:
Open the package.js folder and find that the scripts in the folder have dev as shown below:
,
But I can’t find it. What is the reason? The last time I saw that the path was wrong, when vue init webpack my-project, I created a folder by myself, and I couldn’t get the dev in the corresponding package.js.
cd to the corresponding folder, re-run npm run dev and it will be OK .
And the scripts in package.js do not have dev, in this case
Enter vue init webpack to download the missing package.json again:
“dev”: “webpack-dev-server –inline –progress –config build/webpack.dev.conf.js”,
“start”: “npm run dev”,
“build”: “node build/build. js”
Then install dependencies in npm intall, and finally npm run dev
Also suitable for solving start, build loss
Read More:
- How to Fix Webpack run error webpack dev server
- [Solved] – npm run dev Error: listen EADDRINUSE: address already in use :::8000(or 8080 etc.)
- NPM run dev error Error:listenEADDRNOTAVAIL [How to Solve]
- NPM run dev Error Module build failed: Error: Cannot find module ‘node-sass’
- Vue Package Error: npm ERR! missing script: build
- How to Solve NPM update check failed Error
- How to Solve Error: Missing type map configuration or unsupported mapping
- Dev C++ Error: error: ld returned 1 exit status [How to Solve]
- [Solved] error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set
- How to Solve npm Error: unable to get local issuer certificate
- How to Solve Msys2/mingw64 Run cmake GUI Error
- How to Solve kaldi Gstreamer worker Run Error
- How to Solve Android Studio run main() Method Error
- How to Solve Hadoop Missing Hadoop.dll and winutils.exe file error
- How to Solve rqt Run error under ROS
- Analysis of npm error ENOTFOUND npm ERR! network request to https://npm.***.com/*** failed and the role of the .npmrc file
- How to Solve QT error: LNK1158: Cannot Run “rc.exe”
- How to Solve Docker Run Error: standard_init_linux.go:219: exec user process caused: exec format error
- Puppeteer Error: Chromium revision is not downloaded. Run “npm install“ or “yarn install“