If you are having an older version of react or node, there is a high chance that you might get the below error. In the article, I have provided the exact solution to fix these issues.
Issue 1 – You are running create-react-app
5.0.0, which is behind the latest release (5.0.1)
Just follow below 3 steps –
- npm uninstall -g create-react-app
- npx clear-npx-cache
If clear chance does not work , delete all data from C:\Users\Your_user_name\AppData\Roaming\npm-cache
- npx create-react-app my-app
If the above steps don’t fix your issue, there is a high chance that you might get the below error.
Issue 2 – Error: EPERM: operation not permitted, mkdir ‘C:\Users\Himanshu’
Step 1 –
Create a folder in C: drive and write the below command
For Install Create React App Package Command: npm install -g create-react-app
Step 2 –
Now that the npm package is installed globally, you can go ahead and create your project.
For Create React App Command : npx create-react-app my-app
Hope this article helped.