Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find module '\react-scripts\bin\react-scripts.js'

Tags:

reactjs

I have just started learning React and created a first app by using below commands npm install -g create-react-app npx create-react-app myapp after this i moved into my app folder and then used 'npm start' command to start the server but i go this error.enter image description here

Please help me to resolve this problem and starting the react server.

like image 587
Lovepreet Singh Avatar asked Mar 29 '20 09:03

Lovepreet Singh


2 Answers

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.

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

like image 73
Voicu Avatar answered Oct 22 '22 13:10

Voicu


It's happening most likely because of an & in your folder name which is getting used as the path of your project. So Check the whole path trail of your project and rename any folder with "&" to only text-based names.

The Run - npm start from the console. Hope it will solve your problem. Enjoy coding and changing the world.

like image 37
Arijit Hajra Avatar answered Oct 22 '22 15:10

Arijit Hajra