React 19 came out and npx create app is using it but it's not working as expected as testing library is not up-to-date yet.
facebook/react#32016 (comment)
The workflows that solve version incompatibility issues without --force or --legacy-peer-deps and restrict the versions to current up-to-date ones. Make sure the last command runs without errors (vulnerability warnings don't count)
npx -y create-react-app@5 .
npm rm cra-template
npm i react@19 react-dom@19 web-vitals@3
npm i -D @testing-library/jest-dom @testing-library/react @testing-library/user-event jest@29
npx -y rimraf node_modules && npm i
npx -y create-react-app@5 . --template=typescript
node -e "require('react-scripts/scripts/utils/verifyTypeScriptSetup')()"
npm rm cra-template-typescript
npm i @types/react@19 @types/react-dom@19 react@19 react-dom@19 web-vitals@3
npm i -D @testing-library/jest-dom @testing-library/react @testing-library/user-event @types/jest@29 @types/node jest@29 typescript@5
npm pkg set overrides.react-scripts.typescript=">=5"
npx -y rimraf node_modules && npm i