Reputation: 485
I'm using the "Getting Started" guide because I've been experiencing endless errors trying to create a react app so far when following tutorials.
And straight away I'm running into a problem. When I run npx create-react-app my-app
I get the following:
Cannot find module 'C:\Users\Aristophanes\node_modules\create-react-app\index.js'
Can anyone advise me what I'm doing wrong? Thanks.
Upvotes: 2
Views: 4000
Reputation: 11
Thanks for solutions!
The great solution:
npm install --save react-clear-cache
npm uninstall -g create-react-app
npm install -g --force create-react-app
Upvotes: 1
Reputation: 153
You'll have to install the library to clean the browser cache after React app updates by running:
npm install --save react-clear-cache
Then uninstall React globally, using
npm uninstall -g create-react-app
then reinstall React globally again:
$ npm install -g create-react-app
Upvotes: 0
Reputation: 11
I had same issue a few times. Every time I was searching thru net for a solution, and for every time i just typed in terminal
npm i node
and its just started working
Upvotes: 1
Reputation: 362
This must be a problem related with your node installation (maybe you removed manually create-react-app package?). I'd recommend following these steps:
If you really don't want to delete node and npm, try step 2 and see if that works. Following these steps did the job for me, hope that helps you.
Upvotes: 1
Reputation: 758
I think you might miss installing Node and npm in your machine.
Upvotes: 0