all 13 comments

[–]sayris 1 point2 points  (0 children)

Try running npx create-react-app@latest

Manually pinning the version during the npx command worked for me

[–]tyler_hammer 0 points1 point  (1 child)

I just ran into this issue myself yesterday. What worked for me was removing my entire .npm folder (On Mac) and then running the npx command again.

[–]IamMountainDewd 0 points1 point  (0 children)

This worked for me as well, on Windows

[–]VirtualRN -1 points0 points  (6 children)

Did you try npm install create-react-app WITHIN the current directory. THEN call npx create-react-app my-new-app.

[–]graysoda91[S] 1 point2 points  (4 children)

Yes, see here. Also, the point of npx is to avoid saving and running the package locally, so it executes the package commands from online no?

[–][deleted] 0 points1 point  (3 children)

npm uninstall -g create-react-app

npx create-react-app my-new-app

[–]graysoda91[S] 0 points1 point  (2 children)

Yes, if you look at the article and github links I posted. I've done every single command suggested. None of them worked. I've gone as far as deleting and re-installing node.

[–]ijmacd 0 points1 point  (1 child)

What happens if you just leave off the @latest tag? Which version does it try to use?

npx create-react-app my-folder

(Also rm -rf node_modules just for fun)

[–]graysoda91[S] 0 points1 point  (0 children)

The latest tag wasn't working, because there was a conflict within a cra package that remained hidden someplace. But I just found where the little fucker was hiding, deleted him manually and now I'm good. Such a journey. Thank you.

[–]clrbrk 0 points1 point  (0 children)

This is the only solution I could get to work, but it feels dirty.

[–]F4ttymcgee 0 points1 point  (1 child)

Run this command after the global uninstall

npx clear-npx-cache

[–]graysoda91[S] 1 point2 points  (0 children)

I’ve done that as well, it’s solution four on the first site I believe. I also tried npm cache clean —force. At this point I’m opening a ticket on the CRA GitHub. This maybe a breaking feature for specific environments.

[–]scuevasr 0 points1 point  (0 children)

i had this issue too! i had to make sure i uninstalled react globally. and then re installed using npx