npm ERR! missing script: dev [How to Solve]

NPM run dev error: missing script: dev

Today, when you run the Vue project, you are running NPM   Run dev reports an error, as shown in the following figure:

Open the package.js folder and find that the scripts in the folder have dev, as shown in the following figure:

But I can’t find it. Why?Finally, the path is wrong. When Vue init webpack my project, he creates another folder and can’t get dev.js in the corresponding package.js

CD to the corresponding folder and re run NPM run dev

Also, the scripts in package.js do not have dev

Enter Vue init webpack    Download the missing in 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 the dependency in NPM intall, and finally NPM run dev

It is also applicable to solve the loss of start and build

 

Similar Posts: