I am facing a problem with creating a new React app using CRA when I run the following command npx create-react-app my-app
.
npm cache clean --force
npm -g uninstall create-react-app
My node version is v14.15.3
and the npm version is 7.10.0
The error which I get is :
Need to install the following packages:
create-react-app
Ok to proceed? (y)
We no longer support global installation of Create React App. The current solution is simple — run create-react-app and target the latest version. Different versions of npm may help as well, and you can upgrade using the following command. Please note that this may affect other projects on your system.
Create React App is a comfortable environment for learning React, and is the best way to start building a new single-page application in React. npx on the first line is not a typo — it's a package runner tool that comes with npm 5.2+.
The other method is also straightforward, you can check the React app version by heading over to node_modules/react/cjs/react. development. js. You can see the react project version in the commented section as showing given below.
Need to clear the cache on the npx:
npx clear-npx-cache
and then re-run
npx create-react-app <app-name>
and then accept (y)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With