Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] react installation #7990

Closed
2 tasks done
moghadas76 opened this issue Dec 18, 2024 · 1 comment
Closed
2 tasks done

[BUG] react installation #7990

moghadas76 opened this issue Dec 18, 2024 · 1 comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@moghadas76
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

npx create-react-app traffic-flow-visualization --template typescript

run npm fund for details

Installing template dependencies using npm...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: traffic-flow-visualization@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 @testing-library/react@13.4.0
npm error node_modules/@testing-library/react
npm error @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 /home/seyed/.npm/_logs/2024-12-18T12_49_32_695Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/seyed/.npm/_logs/2024-12-18T12_49_32_695Z-debug-0.log
npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 @types/jest@^27.0.1 @types/node@^16.7.13 @types/react@^18.0.0 @types/react-dom@^18.0.0 typescript@^4.4.2 web-vitals@^2.1.0 failed

Expected Behavior

working

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

  • npm: 10.9.0
  • Node.js: 22.12.0
  • OS Name: Ubuntu
  • System Model Name: 22.04
  • npm config:
; node bin location = /home/seyed/.nvm/versions/node/v22.12.0/bin/node
; node version = v22.12.0
; npm local prefix = /home/seyed/PycharmProjects/dashboard/dashboard/src/frontends
; npm version = 10.9.0
; cwd = /home/seyed/PycharmProjects/dashboard/dashboard/src/frontends
; HOME = /home/seyed
; Run `npm config ls -l` to show all defaults.
@moghadas76 moghadas76 added Bug thing that needs fixing Needs Triage needs review for next steps labels Dec 18, 2024
@milaninfy
Copy link
Contributor

milaninfy commented Dec 18, 2024

This appears to be peer dependency issue with the package and not with the npm cli.

typescript template adds @testing-library/react@13.4.0 which needs react@^18 but the project has react@^19 which is conflicting hence the error.

~/workarea/rep/traffic $ npm view @testing-library/react@^13.0.0 peerDependencies 
@testing-library/react@13.0.0 { react: '^18.0.0', 'react-dom': '^18.0.0' }
@testing-library/react@13.0.1 { react: '^18.0.0', 'react-dom': '^18.0.0' }
@testing-library/react@13.1.0 { react: '^18.0.0', 'react-dom': '^18.0.0' }
@testing-library/react@13.1.1 { react: '^18.0.0', 'react-dom': '^18.0.0' }
@testing-library/react@13.2.0 { react: '^18.0.0', 'react-dom': '^18.0.0' }
@testing-library/react@13.3.0 { react: '^18.0.0', 'react-dom': '^18.0.0' }
@testing-library/react@13.4.0 { react: '^18.0.0', 'react-dom': '^18.0.0' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants