close

[Solved] npm ERR! 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 npm ERR! 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 npm ERR! missing script: start Error 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:

How To Solve npm ERR! missing script: start Error ?

  1. How To Solve npm ERR! missing script: start Error?

    To Solve npm ERR! missing script: start Error 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. npm ERR! missing script: start

    To Solve npm ERR! missing script: start Error 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

5 thoughts on “[Solved] npm ERR! missing script: start”

Leave a Comment