After executing npx create-react-app my-app it doesn't create the directory and file structure. I only have this:
Same issue.
I think it's due to an older version installed before. Just uninstall the global installation of create-react-app and after it should work.
Suggestion, this detail should be highlighted in the documentation instead of into a single paragraph.
It's still same. uninstalled globally, tried to install using npx. issue isn't resolved yet.
@ashishtechuz what do you get when you run these following commands?
which npm
which create-react-app
create-react-app --version
npx create-react-app --version
@ashishtechuz Have you tried the solution here: #8097
The fastest way to determine whether you're using a globally installed version _or_ a version higher in your directory tree is to run with the --ignore-existing flag and see if it works. Full command would be npx --ignore-existing create-react-app my-app.
@Steve-Reid this should work, yes.
I'm having the same issue. but npx --ignore-existing create-react-app my-app works for me.
But the solution recommended by Steve-Reid didn't
@dschlossman So npx will run without installing because either 1. the binary is installed globally and accessible in the path or 2. the binary is available in some node_modules at or above your current working directory. Calling which create-react-app (or whatever the windows equivalent is) will tell you whether its installed globally, and if it's not you need to find where it is above your path and remove it there.
Most helpful comment
@ashishtechuz Have you tried the solution here: #8097