kourosh mostafavi
kourosh mostafavi

Reputation: 1

Module error when running 'npm start' in my React project

Here is the error I am getting when I enter npm start:

internal/modules/cjs/loader.js:905
throw err;
Error: Cannot find module 'C:\Users\react-scripts\bin\react-scripts.js
   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) 
   at Function.Module._load (internal/modules/cjs/loader.js:746:27) 
   at Function.executelserEntryPoint (as runMain] (internal/modules/run_main.js:76:12)
   at internal/main/run_main_module.js:17:47 { 
  code: 'MODULE_NOT_FOUND', 
  requireStack: []
}

I tried reinstalling my React project but it did not fix my error.

Upvotes: 0

Views: 489

Answers (1)

Suleman Ahmad
Suleman Ahmad

Reputation: 484

If you have an & in your project's path you will run into this issue, at least on Windows it seems like. The part in the path after the & is interpreted as another command as per the error and everything breaks from there.

So create the project out of Users folder in your case and where H&K should be not be the path.

Confirming that as soon as it's removed, npm start works fine.

Upvotes: 2

Related Questions