DEV Community

Discussion on: Building Your First React Website

 
dceddia profile image
Dave Ceddia

CRA is good for bigger projects too, definitely well-suited to more than just toy/learning apps. If you're only gonna use a tool once or twice though, yeah, npx is awesome.

On the other hand... here's a quick test of running npx create-react-app a few times (not actually creating an app, literally just printing the help text):

$ npx create-react-app
npx: installed 91 in 5.464s

$ npx create-react-app
npx: installed 91 in 4.985s

$ npx create-react-app
npx: installed 91 in 5.091s

I'm personally happy to pay the price of a bit of disk space and an extra file in my bin folder to save 5 seconds every time I run a tool 🤷‍♂️

Gonna go re-install that now 😄

Thread Thread
 
brightondube profile image
Brighton Dube • Edited

Hi Dave, I use Windows 10, WSL, and VS Code for development. I have one problem with using npx, I have seen a few other people raise that issue on Github and SO but there seems to be no answers. When I run $npx create-react-app I always get this warning :

You are using npm 3.10.10 so the project will be bootstrapped with an old unsupported version of >tools.

Please update to npm 5 or higher for a better, fully supported experience.

But...
$npm --version
6.13.4

Clearly I have a higher version of npm installed than what CRA is telling me!
The only solution I ever found was to install CRA globally or to use yarn.
However, I don't understand what is causing this, I have an open issue on the react repo and no answers, I looked at similar issues, there were no solutions to this particular problem!

After the installation is done I get :

Note: the project was bootstrapped with an old unsupported version of tools.
Please update to Node >=8.10 and npm >=5 to get supported tools in new projects.