admin管理员组

文章数量:1134248

Below is the message on the log file. Any help please, really discouraging.

'Log files: C:\Users\user\AppData\Local\npm-cache_logs\2025-01-07T21_38_20_381Z-debug-0.log

npm resolution error report

While resolving: [email protected] Found: [email protected] node_modules/react react@"^19.0.0" from the root project

Could not resolve dependency: peer react@"^18.0.0" from @testing-library/[email protected] node_modules/@testing-library/react @testing-library/react@"^13.0.0" from the root project

Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.

i tried creating react app, and i ran npm create-react-app myapp, and its been throwing errors.

Below is the message on the log file. Any help please, really discouraging.

'Log files: C:\Users\user\AppData\Local\npm-cache_logs\2025-01-07T21_38_20_381Z-debug-0.log

npm resolution error report

While resolving: [email protected] Found: [email protected] node_modules/react react@"^19.0.0" from the root project

Could not resolve dependency: peer react@"^18.0.0" from @testing-library/[email protected] node_modules/@testing-library/react @testing-library/react@"^13.0.0" from the root project

Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.

i tried creating react app, and i ran npm create-react-app myapp, and its been throwing errors.

Share Improve this question asked Jan 7 at 21:56 Lord-BishLord-Bish 1 New contributor Lord-Bish is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • create-react-app is deprecated, you should avoid using that. – Lã Ngọc Hải Commented Jan 8 at 1:57
Add a comment  | 

1 Answer 1

Reset to default 0

This error is due to a version mismatch between the React version installed (19.0.0) and the peer dependency requirement of @testing-library/react (^18.0.0).

Delete the node_modules folder and run:

npm install --legacy-peer-deps

OR

npm install --force

本文标签: reactjsunable to run createreactapp in vscode on my windowsStack Overflow