npm uninstall -g create-react-app and yarn global remove create-react-app not working

Viewed 205

I am unable to uninstall create-react-app globally using npm uninstall -g create-react-app and yarn global remove create-react-app. I uninstalled node and installed it still same problem.

enter image description here

2 Answers

After npm uninstall -g create-react-app :

  1. npm cache clean --force
  2. npm cache verify
  3. npx clear-npx-cache to clear your npx cache.
  4. npx create-react-app your-app or npx create-react-app@latest my-app --use-npm
npm uninstall -g create-react-app
npx clear-npx-cache
npx create-react-app <app_name>

The above command does

  1. uninstall create-react-app CLI globally.
  2. npx clear cache.
  3. create a react application
Related