Reputation: 566
I'm trying to start a React application, with npm but I get this error:
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)
I'm using node version 10.16.3 and npm 6.13.6. I've cleaned npm cache and install npm again, but I'm getting always the same error
Upvotes: 0
Views: 123
Reputation: 566
the problem is fixed , i've installed another version of "react-scripts" , because the actuel version is not stable , so i use to overwrite it with the given version, so use this command to install :
npm install [email protected]
Once the installation is completed your can run your reac app :
npm start
Upvotes: 0
Reputation: 581
I suggest doing these three steps:
npm install -g npm@latest
to update npm because it is sometimes buggy.rm -rf node_modules
to remove the existing modules.npm install
to re-install the project dependencies.Upvotes: 1