-2

I installed node JS in my device only last week and its version is 12.18.1 and npm version is 6.14.5 . npx create-react-app is working and I get all the node modules and other files but when I try to start it gives be following error. PS: I changed the folder and then started as npm start.

    npm start
Starting the development server...

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

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn cmd',
  path: 'cmd',
  spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! projectreact@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the projectreact@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\user\AppData\Roaming\npm-cache\_logs\2020-06-28T06_35_26_852Z-debug.log

Please help developers!!

Aashish
  • 33
  • 5
  • Duplicate of [Problem with npm start (error : spawn cmd ENOENT)](https://stackoverflow.com/questions/57054403/problem-with-npm-start-error-spawn-cmd-enoent) – Guy Incognito Jun 28 '20 at 06:48
  • Yes I had that checked and had already tried every single one of those ::: npm cache clear --force , adding C:\Windows\System32 to the PATH, reinstalling the node JS in my device before posting this here. But none seem to work. I keep getting the error!!! – Aashish Jun 28 '20 at 07:21

1 Answers1

0

You can try using command :

lsof -i : port number

to get list of all the processes running on the port.

And then kill the process using command kill -9 Process Id

saniya
  • 59
  • 1
  • 9