Start script missing error when running npm start

0 votes

I have been constantly receiving this error when trying to debug my node application using the npm start command.






Error:

npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 
npm ERR! node v0.12.7 
npm ERR! npm v2.11.3 

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: 
npm ERR! C:\Users\andrmoll.NORTHAMERICA\Documents\GitHub\SVIChallenge\npm-debug.log

From the debug file:

 

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 
          at C:\Program
Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:345:5 
          at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:309:45) 
          at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:343:3) 
          at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:113:5) 
          at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:300:12 
          at evalmachine.<anonymous>:334:14 at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:102:5 
        at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
Feb 10, 2022 in Java by Rahul
• 9,680 points
4,430 views

1 answer to this question.

0 votes

It seems that there is an undefined start script in your package.json file or your project does not contain a server.js file. Could be either of the two. You can either change the name of your application script to server.js or add the following to your package.json

"scripts": { "start": "node your-script.js" }
You could also run the line below directly:-

node your-script.js 

answered Feb 10, 2022 by Soham
• 9,710 points

Related Questions In Java

0 votes
2 answers

When I am running eclispe on my computer it is throwing error. How to resolve it?

If you have downloaded the 64 bit ...READ MORE

answered Dec 10, 2018 in Java by Sushmita
• 6,920 points
1,028 views
0 votes
1 answer

Following error is occurring "Can't start Eclipse - Java was started but returned exit code=13"

There are combinations of Operating System, JDK ...READ MORE

answered Apr 19, 2018 in Java by Rishabh
• 3,620 points
2,960 views
0 votes
2 answers

I'm getting following error, while i'm running code in windows xp service pack 3 with JDK 6 version.

Till you send the code, I would ...READ MORE

answered May 16, 2018 in Java by Meci Matt
• 9,460 points
2,677 views
0 votes
1 answer

Getting error 404 not found when trying to download JDK

Try this command, it should work: wget --no-check-certificate ...READ MORE

answered Dec 26, 2018 in Java by Omkar
• 69,220 points
3,304 views
0 votes
0 answers

Error: Can't set headers after they are sent to the client

I am using Node.js 4.10 and Express ...READ MORE

May 7, 2022 in Java-Script by narikkadan
• 63,600 points
1,391 views
0 votes
0 answers

TypeError: Router.use() requires middleware function but got a Object

There were some changes made in the ...READ MORE

May 12, 2022 in Java-Script by Kichu
• 19,040 points
7,801 views
0 votes
0 answers

TypeError: Converting circular structure to JSON in nodejs

Code : var formData = ({first_name:firstname,last_name:lastname,user_name:username, email:email,password:password}); ...READ MORE

May 13, 2022 in Java-Script by Kichu
• 19,040 points
3,950 views
0 votes
1 answer

What are the -Xms and -Xmx parameters when starting JVM?

The XMX parameter helps in signifying and ...READ MORE

answered Feb 8, 2022 in Java by Soham
• 9,710 points
9,486 views
0 votes
1 answer

Google Conversions Not Working - Script Won't Load

To give you a suggestion, you will ...READ MORE

answered Feb 10, 2022 in Java by Soham
• 9,710 points
2,973 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP