AdagioDev
AdagioDev

Reputation: 566

Why npm start is getting error for react project?

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

Answers (2)

AdagioDev
AdagioDev

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

Anil Stha
Anil Stha

Reputation: 581

I suggest doing these three steps:

  1. npm install -g npm@latest to update npm because it is sometimes buggy.
  2. rm -rf node_modules to remove the existing modules.
  3. npm install to re-install the project dependencies.

Upvotes: 1

Related Questions