question-mark
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.

React npm start con't run and open the localhost:3000

See original GitHub issue

app@0.1.0 start C:\Users\mohammad ahmad\Desktop\React Projects\app react-scripts start

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) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! app@0.1.0 start: react-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the app@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\mohammad ahmad\AppData\Roaming\npm-cache_logs\2019-05-15T20_48_25_193Z-debug.log

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:9
  • Comments:39

github_iconTop GitHub Comments

48reactions
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.

25reactions
alexreucommented, May 16, 2019

Finally i downgrade my react-scripts in package.json to this version : “react-scripts”: “^2.1.8” and it works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node & React - npm start - is running BUT localhost:3000 " ...
which seems like the server is running okay; but localhost:3000 cant be reached not opening anything the first time it did open and...
Read more >
localhost:3000 not opening in the web browser · Issue #5392
I created a local react my-app setup using npm create-react-app my-app command in the command line as given in the react docs.
Read more >
npm start issue solved 100% | react project not getting started
How to Fix Localhost Refused to Connect · Create a React App WITHOUT Create React App · React JS - React Tutorial for...
Read more >
start-server-and-test
Starts server, waits for URL, then runs test command; when the tests end, shuts down server. Latest version: 1.15.2, last published: 19 days ......
Read more >
How to Run React JS Project in Localhost
The NPX approach makes completing your task easier and hassle-free as you don't need to install the package globally. With the NPM method,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found