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
No description
14 Replies
Jochem
Jochem7d ago
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?
ItsAmjed
ItsAmjedOP7d ago
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
Jochem
Jochem7d ago
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
ItsAmjed
ItsAmjedOP7d ago
i updated my npm and node
ItsAmjed
ItsAmjedOP7d ago
No description
ItsAmjed
ItsAmjedOP7d ago
latest v first thing i did is update when i saw the err msg
Jochem
Jochem7d ago
and that screenshot is the direct output of running npx create-react-app yourprojectname?
ItsAmjed
ItsAmjedOP7d ago
yeah ofc
glutonium
glutonium7d ago
don't use create-react-app use vite run npm create vite@latest
ItsAmjed
ItsAmjedOP7d ago
whats the diff \
glutonium
glutonium7d ago
it's faster and better
𝚆𝚘𝚕𝚏𝚒𝚎🔥𝚎𝚕𝚒𝚝𝚎
Agreed. I use vite all the time
clevermissfox
clevermissfox6d ago
Also agree, using vite is better than CRA. Just know that you need to prepend your env vars with VITE_* fyi
dys 🐙
dys 🐙6d ago
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.

Did you find this page helpful?