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

Romania Primero - npm install fails with latest app version #483

Open
AlexTheProg opened this issue Dec 5, 2024 · 0 comments
Open

Romania Primero - npm install fails with latest app version #483

AlexTheProg opened this issue Dec 5, 2024 · 0 comments

Comments

@AlexTheProg
Copy link
Contributor

AlexTheProg commented Dec 5, 2024

I tried setting up the project on a Ubuntu 24.10, used the main branch of the project

npm error ERESOLVE could not resolve
npm error
npm error While resolving: @testing-library/[email protected]
npm error Found: @types/[email protected]
npm error node_modules/@types/react
npm error   peerOptional @types/react@"^17.0.0 || ^18.0.0" from @mui/[email protected]
npm error   node_modules/@mui/base
npm error     @mui/base@"5.0.0-beta.40" from @mui/[email protected]
npm error     node_modules/@mui/lab
npm error       @mui/lab@"^5.0.0-alpha.170" from the root project
npm error     @mui/base@"5.0.0-beta.40" from @mui/[email protected]
npm error     node_modules/@mui/material
npm error       @mui/material@"^5.15.20" from the root project
npm error       8 more (@mui/icons-material, @mui/lab, @mui/x-date-pickers, ...)
npm error     1 more (@mui/x-date-pickers)
npm error   peerOptional @types/react@"^17.0.0 || ^18.0.0" from @mui/[email protected]
npm error   node_modules/@mui/icons-material
npm error     @mui/icons-material@"^5.15.20" from the root project
npm error     peer @mui/icons-material@"^5.11.0" from [email protected]
npm error     node_modules/mui-datatables
npm error       dev mui-datatables@"^4.3.0" from the root project
npm error     1 more (mui-nepali-datepicker-reactjs)
npm error   10 more (@mui/lab, @mui/material, @mui/private-theming, ...)
npm error
npm error Could not resolve dependency:
npm error peerOptional @types/react@"^18.0.0" from @testing-library/[email protected]
npm error node_modules/@testing-library/react
npm error   dev @testing-library/react@"^16.0.0" from the root project
npm error
npm error Conflicting peer dependency: @types/[email protected]
npm error node_modules/@types/react
npm error   peerOptional @types/react@"^18.0.0" from @testing-library/[email protected]
npm error   node_modules/@testing-library/react
npm error     dev @testing-library/react@"^16.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 /Users/alex/.npm/_logs/2024-12-05T14_14_15_005Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/alex/.npm/_logs/2024-12-05T14_14_15_005Z-debug-0.log

We are currently handling the Primero deploy for Romania, and I ran into these issues when testing the new features locally, hoping to update our production branch with the main upstream branch.

I can work around this issue by deleting "@testing-library/react-hooks": "^8.0.1" from the package.json file.

Could you also check to see if the file also causes this issue on your end? All I did on my Ubuntu machine was to follow the guide precisely, everything went well until the npm ci step, where it fails with above mentioned messages.

I have used our updated fork, but also tested with the upstream main branch and the issue is the same. Also, I did a bit of troubleshooting and reverted the package.json file to the version where React was first upped to v18 and npm install and npm ci seemed to work fine.

Using:

  • Ubuntu 24.10
  • LTS Node version installed through nvm

Also tried on:

  • MacOS Sonoma 14.6.1
  • LTS Node locally installed

Updating @testing-library/[email protected] to @testing-library/[email protected] results in

npm error ERESOLVE could not resolve
npm error
npm error While resolving: @testing-library/[email protected]
npm error Found: [email protected]
npm error node_modules/react-test-renderer
npm error   dev react-test-renderer@"^18.3.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional react-test-renderer@"^16.9.0 || ^17.0.0" from @testing-library/[email protected]
npm error node_modules/@testing-library/react-hooks
npm error   dev @testing-library/react-hooks@"^8.0.1" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react-test-renderer
npm error   peerOptional react-test-renderer@"^16.9.0 || ^17.0.0" from @testing-library/[email protected]
npm error   node_modules/@testing-library/react-hooks
npm error     dev @testing-library/react-hooks@"^8.0.1" 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 /Users/alex/.npm/_logs/2024-12-05T14_28_43_478Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/alex/.npm/_logs/2024-12-05T14_28_43_478Z-debug-0.log

which led me to believe it is an issue with @testing-library/react-hooks@"^8.0.1" which seems to have last been updated ~2 years ago on npm. (https://www.npmjs.com/package/@testing-library/react-hooks)

@AlexTheProg AlexTheProg changed the title npm install fails with latest app version Romania Primero - npm install fails with latest app version Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant