close

[Solved] Error: missing script: start

Hello Guys, How are you all? Hope You all Are Fine. Today When I ran npm start I am facing the following error Error: missing script: start in nodejs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Error: missing script: start Occurs ?

I am just trying to debug my nodejs application But I am following an error while I ran the npm start command.

npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>npm ERR! Please include the following file with any support request:
Error: missing script: start
       at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:142:19)
       at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:58:5

How To Solve Error: missing script: start?

  1. How To Solve Error: missing script: start?

    To Solve Error: missing script: start You Might not Define the start script in your package.json file. All You Need to do is Just add the start script in your package.json Just like below. The second solution is If you don't want to add a start script in your package.json then simply run node your-script.js directly.

  2. Error: missing script: start

    To Solve Error: missing script: start You Might not Define the start script in your package.json file. All You Need to do is Just add the start script in your package.json Just like below. Second solution is If you don't want to add a start script in your package.json then simply run node your-script.js directly

Solution 1: Just add start script in your package.json

You Might not Define the start script in your package.json file. All You Need to do is Just add the start script in your package.json Just like below.

"scripts": {
    "start": "node your-script.js"
}

Solution 2: Run Your Script directly

If you don’t want to add a start script in your package.json then simply run node your-script.js directly

Solution 3: Check for start script in pacakage.json

Just cross-check if you used scripts twice or not In my case, it wasn’t working because I used "scripts" twice.

Solution 4: Run this command

Just run this command

npm rm -g create-react-app
npm install -g create-react-app
npx create-react-app my-app

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment