Error on command npm start how to fix this

Asked
Active3 hr before
Viewed126 times

5 Answers

error
90%

I'm receiving this error when trying to debug my node application using the npm start command., 2 This answer may not be an exact response, but it certainly helped me to find why npm start was not working. – Obromios Mar 13 '16 at 22:09 ,Please use the below line of code in script object which is there in package.json

You could 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"
}
load more v
88%

I am getting the following error when I run npm start after doing,Let's try running each of the scripts that are called in the prestart command separately to see which one is throwing an error for you:,Run npm install or yarn, depending on the package manager you use.

npm ERR!Linux 4.2 .6 - 301. fc23.x86_64
npm ERR!argv "/usr/bin/node"
"/home/nhduc/.npm-global/bin/npm"
"start"
npm ERR!node v5 .10 .1
npm ERR!npm v3 .8 .6
npm ERR!file sh
npm ERR!code ELIFECYCLE
npm ERR!errno ENOENT
npm ERR!syscall spawn
npm ERR!react - slingshot @3 .0 .1 prestart: `npm-run-all --parallel start-message remove-dist lint:tools`
npm ERR!spawn ENOENT
npm ERR!
   npm ERR!Failed at the react - slingshot @3 .0 .1 prestart script 'npm-run-all --parallel start-message remove-dist lint:tools'.
npm ERR!Make sure you have the latest version of node.js and npm installed.
npm ERR!If you do,
   this is most likely a problem with the react - slingshot package,
   npm ERR!not with npm itself.
npm ERR!Tell the author that this fails on your system:
   npm ERR!npm - run - all--parallel start - message remove - dist lint: tools
npm ERR!You can get information on how to open an issue
for this project with:
   npm ERR!npm bugs react - slingshot
npm ERR!Or
if that isn 't available, you can get their info via:
npm ERR!npm owner ls react - slingshot
npm ERR!There is likely additional logging output above.

npm ERR!Please include the following file with any support request:
   npm ERR!/home/nhduc / Documents / projects / react - slingshot / npm - debug.log
load more v
72%

Whatever the case, you can follow the steps below to learn how to run npm start without incurring an error message. ,In this article, you learned how to fix a line in a file so that the npm start command works. As you saw, the error that was thrown at us was pretty descriptive—there was a missing script regarding the start command! ,Let’s go over some steps we can take to fix this error. We will go into our project’s package.json file and add a start script to the file so we can use the npm start command.

Pretag
 Pretag team - issue, fix, solve, resolve
65%

When your package.json file doesn’t have the start command under the scripts property, then NPM will run node server.js instead.if(typeof __ez_fad_position!='undefined'){__ez_fad_position('div-gpt-ad-sebhastian_com-box-4-0')};,The npm start command is used to run the start command written inside your project’s package.json file.,The content of the start script may vary, but it must always be located inside the scripts property.

$ npm start
npm ERR!enoent ENOENT: no such file or directory, open '/package.json'
load more v
75%

tell your current version of npm to use known registrars npm config set ca="",upgrade your version of npm npm install npm -g --ca="",Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).

npm ERR!Error: ENOSPC, write
load more v

Other "error-undefined" queries related to "Error on command npm start how to fix this"