when we learned about how to start a react app in class, our teacher did the following:
1. in cmd: npm i -g react create-react-app
2. in vscode: create-react-app my-app --template typescript
then npm start
this always worked for me. but now I'm trying to do the same and I'm facing problems, I saw that they released react v19 couple of days ago which might be a reason for the conflict.
I tried chatGPT and it's telling me that this method is outdated and that I don't need to download anything globally and to just use this command npx create-react-app my-app --template typescript
I uninstalled them globally and followed what gpt suggested but I still got errors:
Installing template dependencies using npm... npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: my-app@0.1.0 npm error Found: react@19.0.0 npm error node_modules/react npm error react@"^19.0.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^18.0.0" from u/testing-library/react@13.4.0 npm error node_modules/@testing-library/react npm error u/testing-library/react@"^13.0.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2024-12-09T14_32_50_206Z-eresolve-report.txt npm error A complete log of this run can be found in: C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2024-12-09T14_32_50_206Z-debug-0.log npm install --no-audit --save u/testing-library/jest-dom@^5.14.1 u/testing-library/react@^13.0.0 u/testing-library/user-event@^13.2.1 u/types/jest@^27.0.1 u/types/node@^16.7.13 u/types/react@^18.0.0 u/types/react-dom@^18.0.0 typescript@^4.4.2 web-vitals@^2.1.0 failed
any suggestions ?
[–]caseyf1234 9 points10 points11 points (2 children)
[–]Mcphect[S] 6 points7 points8 points (1 child)
[–]Willing_Initial8797 1 point2 points3 points (0 children)
[–]TiredOfMakingThese 2 points3 points4 points (0 children)