0

I just installed a react app and I'm just trying to run it, npm start gives me an error (I have not changed any code).

Here's what i've already tried before reaching this dead end: -Deleting and reinstalling node modules -installing/updating npm -clearing npm cache -installing through powershell admin and git bash -killing port 3000 -installing with npx -installing globally -rebooted system -tried this links:npm start error with create-react-app

    events.js:177
    throw er; // Unhandled 'error' event
     ^

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:74:11)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:74:11) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:3000/' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app-name@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app-name@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 `enter code here`in:
npm ERR!     C:\Users\Kathy\AppData\Roaming\npm-cache\_logs\2019-07- 
24T00_21_22_580Z-debug.log
kzero
  • 1

1 Answers1

0

I came across the same issue and found that it is only present with react-scripts@3.0.0, downgrading to react-scripts@2.1.8 resolved the issue.

  create-react-app my-app
  cd my-app
  npm install react-scripts@2.1.8
  npm start