Every time I try to run npx create-react-app my-app, the same error will show:
A template was not provided. This is likely because you're using an outdated version of create-react-app. Please note that global installs of create-react-app are no longer supported. You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.
I did whatever this error said. Try using another text editor rather than VSCode and try all of the ways that people suggested in related topics, but nothing works.
CodePudding user response:
check whether create-react-app has been uninstalled by typing which create-react-app, if it is not uninstalled it will exit the create-react-app folder located ex : /usr/bin/create-react-app. then delete with rm /usr/bin/create-react-app
CodePudding user response:
It is maybe because you are not using the latest create-react-app version.
If you are using npm 5.1 or earlier, you can't use npx. Instead, install create-react-app globally:
npm install -g create-react-app
then run:
npx create-react-app my-app
See all information here. Hope this answers helps you.
