Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm start failed to start App

See original GitHub issue

Hello Folks,

I am having this issue from yesterday, When I am trying to create new app with create-react-app and trying to start it thorwing below error. Though old apps are still running. Please help me in this as I have already tried all solutions available on stackoverflow and issue list.

OS: WIN 7, NODE : 10.15.0 NPM: 6.4.1

Error On Cmd:

Starting the development server…

events.js:174 throw er; // Unhandled ‘error’ event ^

Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) Emitted ‘error’ event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) error Command failed with exit code 1.

with Verboose : 0 info it worked if it ends with ok 1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’, 1 verbose cli ‘C:\Users\Devloper\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘start’ ] 2 info using npm@6.9.0 3 info using node@v10.15.1 4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ] 5 info lifecycle testapp@0.1.0~prestart: testapp@0.1.0 6 info lifecycle testapp@0.1.0~start: testapp@0.1.0 7 verbose lifecycle testapp@0.1.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle testapp@0.1.0~start: PATH: C:\Users\Devloper\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\react\NoteTakingApp\testapp\node_modules.bin;C:\Program Files\nodejs;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Users\Devloper\AppData\Roaming\npm 9 verbose lifecycle testapp@0.1.0~start: CWD: D:\react\NoteTakingApp\testapp 10 silly lifecycle testapp@0.1.0~start: Args: [ ‘/d /s /c’, ‘react-scripts start’ ] 11 silly lifecycle testapp@0.1.0~start: Returned: code: 1 signal: null 12 info lifecycle testapp@0.1.0~start: Failed to exec start script 13 verbose stack Error: testapp@0.1.0 start: react-scripts start 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Users\Devloper\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:189:13) 13 verbose stack at ChildProcess.<anonymous> (C:\Users\Devloper\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:189:13) 13 verbose stack at maybeClose (internal/child_process.js:970:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid testapp@0.1.0 15 verbose cwd D:\react\NoteTakingApp\testapp 16 verbose Windows_NT 6.1.7601 17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Users\Devloper\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “start” 18 verbose node v10.15.1 19 verbose npm v6.9.0 20 error code ELIFECYCLE 21 error errno 1 22 error testapp@0.1.0 start: react-scripts start 22 error Exit status 1 23 error Failed at the testapp@0.1.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:27 (1 by maintainers)

github_iconTop GitHub Comments

creativetimcommented, May 23, 2019

Was helping someone with this problem on their Windows box and came across the following SO article and it did the trick.

I checked system variables one more time and found the cause of the problem: missing C:\Windows\System32\ variable. I added it and that solved my problem

More detailed instructions that didn’t get labeled as the answer:

Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System.

Took a fair amount of Googling to arrive there. Hopefully this helps people out so they aren’t forced to try a particular, now outdated, version of react-scripts just to get their React app running.

florin1000commented, May 3, 2019

Sorry, I have updated my answer. 1)remove node_modules and lock files 2)edit package.json so the new version of react-scripts is “2.1.8” 3)yarn install / npm install 4)cd your-app 5)yarn start / npm start

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run "npm start" shows error. how to resolve?
Try typing npm run start alt npm r start. navigate to the same folder where the package.json is located type npm install to...
Read more >
"The NPM script 'start' exited without indicating that the create ...
"The NPM script 'start' exited without indicating that the create-react-app server was listening for requests" In .Net React Application.
Read more >
Getting an error while running nodejs app when running locally
Run the following commands: npm install npm start Here is the package.json: ... Failed at the dashdbnodesample@0.0.1 start script 'node app.js'. npm ERR!...
Read more >
start-server-and-test - npm
You can provide port number and custom test command, in that case npm start is assumed to start the server. { "scripts": {...
Read more >
How to configure Systemd service unit to start Node app with ...
I'd rather have the Systemd unit also start the app with npm start . Unfortunately it threw an error when I changed app.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found