Search code examples
reactjsnpmcreate-react-app

Cannot create a React app with create-react-app


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.

  • I tried to clear npm cache with this command npm cache clean --force
  • I also tried this command 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)

Solution

    1. Options 1
      Switch to yarn instead of npm
      npm i -g yarn
      yarn create react-app
      
    2. Options 2
      Uninstal Node completely and re-instal it again
    3. Option 3
      Use nvm (Node Version Manager)