I am trying to create a new project using create-react-app using the command given on the docs i.e npx create-react-app my-app but it doesn\'t cont
I had the same problem, this how I solved it.
When I try to run npm rm -g create-react-app, it shows an error.
So I went to the node modules directory (for Mac /usr/local/lib/node_modules) and delete create-react-app directory and reinstall create-react-app using npx create-react-app my-app.
I tried all the suggestion stated above but none works for me. This suggestion at 8097 works for me. Basically, I just run npx create-react-app@latest your-project-name
Still didn't got to know the issue. But i tried :-
npm rm -g create-react-app
npm install -g create-react-app
npx create-react-app my-app
This also didn't worked for me. So I uninstalled node and installed it again. It worked for me
Try with these steps :
npm rm -g create-react-appnpm install -g create-react-appnpx create-react-app my-appSource
Follow the following steps and that should solve your problem.
sudo npm rm -g create-react-app (Do not skip sudo if you are a macOS user).
npx create-react-app my-app (npm 5.2+ and higher)
or
npm init react-app my-app
or
yarn create react-app my-app (if you use yarn)
You can uninstall a globally installed package with this:
npm uninstall -g create-react-app