Tag Archives: error: missing script:dev

How to Solve NPM run dev error: missing script:dev

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