npm installing problem
its been while since i code
i tried to create new project and this error pop up
i updated my node and npm tp latest version
14 Replies
how long is "a while"? Have you updated node and npm since you started back up?
also, what command are you using? What's in your package.json?
bfr they do the update for react19
i use normal comand to create the project
npx create-react-app
it sais that my project using react19 but its not compatible with @testin-library/react
it's saying testing-library/react requires react version 18, not version 19
I'd recommend updating npm, node, and create-react-app, and then trying again from a fresh project folder
i updated my npm and node
latest v
first thing i did is update when i saw the err msg
and that screenshot is the direct output of running
npx create-react-app yourprojectname
?yeah ofc
don't use create-react-app
use vite
run
npm create vite@latest
whats the diff \
it's faster and better
Agreed. I use vite all the time
Also agree, using vite is better than CRA.
Just know that you need to prepend your env vars with VITE_* fyi
Take a look at the CRA repo. The last updates were almost all about three years ago.
Whereas Vite's oldest changes are about three months. (They just released some pretty significant improvements with the introduction of v6.)
It's also worth noting that odd numbered Node.js releases are experimental & may contain features that go away. It's safer to use long-term supported even numbered releases.