when I use npx create-react-app myapp, all required files and directories are not being created, only package.json, package-lock.json, and node_modules are created automatically.
Please help, am I missing something?
It also says that:
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 need to delete a global installation of create-react-app, via npm rm -g create-react-app
The same issue just happened to me. I have ensured that there is not a global installation of create-react-app, yet It is still happening.
Here is the command which I ran:
npx create-react-app react-example
Ok, I found the solution to this problem.
This issue has a detailed discussion on this topic.
The gist is that there is a create-react-app installed in node_modules directory somewhere up in the directory tree.
@miraage npm rm -g create-react-app was not solving the issue and it was not deleting the global issue.
So I went in the /usr/local/bin and manually deleted the create-react-app. This solved the issue. I still don't understand why the above command did not work.
BTW I am using a MacBook.
mark
As stated earlier, this issue seems to be because of older version of create-react-app. You can either find the older version installed in _usr/local/bin_ or _/usr/local/lib/node_modules_ folders.
If this doesnt work for you then you can use the below command
_npx --ignore-existing create-react-app_
Hey so for now i used , gitbash cli and it seems to work and gave me the entire template .It wasn't working on visual studio code so Iam not sure whats going on LOL.
Most helpful comment
As stated earlier, this issue seems to be because of older version of create-react-app. You can either find the older version installed in _usr/local/bin_ or _/usr/local/lib/node_modules_ folders.
If this doesnt work for you then you can use the below command
_npx --ignore-existing create-react-app_