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

Created on 31 Oct 2019  路  5Comments  路  Source: gatsbyjs/gatsby

events.js:187
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:80:21)
Emitted 'error' event on ChildProcess instance 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:80:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:4200/' ]
}.

Most helpful comment

Please look over the path to system variables for npm node_modules
or delete the node_modules in the project again you can run the command : npm install
npm start

All 5 comments

Thank you for opening this!

Please follow our issue template as your current issue isn't helpful for us and we won't be able to help you.

We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!

solution please i also getting same error

I am getting below error when I run: ng serve -o
events.js:187
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:80:21)
Emitted 'error' event on ChildProcess instance 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:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:4200/' ]
}

Please look over the path to system variables for npm node_modules
or delete the node_modules in the project again you can run the command : npm install
npm start

Downgrading the react-script version from 3.0.1 to 2.1.8 worked for me. npm install [email protected] npm install npm start

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rossPatton picture rossPatton  路  3Comments

kalinchernev picture kalinchernev  路  3Comments

ferMartz picture ferMartz  路  3Comments

jimfilippou picture jimfilippou  路  3Comments

magicly picture magicly  路  3Comments