When I type the create-react-app my-app
command in my terminal, it appears to work - downloading all libraries successfully etc. At the end of that process however I get a message that a template was not provided
.
Input
user@users-MacBook-Pro-2 Desktop% create-react-app my-app
Output
Creating a new React app in /Users/user/Desktop/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
..... nothing out of the ordinary here .....
✨ Done in 27.28s.
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.
In package.json of my-app
:
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.0" <-- up-to-date
}
I checked out the CRA changelog and it looks like support was added for custom templates - however it doesn't look like the command create-react-app my-app
would have changed.
Any idea what is going on here?
These two steps worked for me
1) Uninstalled react-app globally with this command
2) Installed react-app in project folder with this command
To add up more to the answers above:
With the new release of
create-react-app
, you can create a new app using custom templates. Two templates available so far:Usage:
More details of the latest changes in
create-react-app
:https://github.com/facebook/create-react-app/releases/tag/v3.3.0
Using the command
npm uninstall -g create-react-app
didn't work for me.But this worked:
yarn global remove create-react-app
and then:
npx create-react-app my-app
All of the option didn't work for me on MacOS. What did work was the following 3 steps:
then
then
For Linux this worked for me
This solved my problem
Steps:
1.Uninstall the create-react app
2.Now just use
this will automatically create the template for u .