Solve “npm ERR! missing script: start”

Check if there is a “node_modules” directory
If not, enter the command first:

					npm install

Next step.
Open the package.json file and add the following

					"scripts": {
    "start": "node dev-server.js 8080"


Add node to the start file name you want to run (no need to add a directory in the root directory, other directories need a directory, the root directory is ./) and  the port number

*Notice! *The last comma is unnecessary if added to the end of the file.

After the modification is complete, use npm start again.

Leave a Comment

Your email address will not be published.