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

npm install not working #4371

Closed
yoannfleurydev opened this issue Jun 2, 2024 · 4 comments
Closed

npm install not working #4371

yoannfleurydev opened this issue Jun 2, 2024 · 4 comments

Comments

@yoannfleurydev
Copy link
Contributor

What are you trying to achieve?

I try to install dependencies in this project to contribute (#4369)

What do you get instead?

Provide console output if related. Use --verbose mode for more details.

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: codeceptjs@3.6.2
npm error Found: chai@5.1.1
npm error node_modules/chai
npm error   chai@"5.1.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer chai@">= 4.0.0 < 5" from chai-exclude@2.1.0
npm error node_modules/chai-exclude
npm error   chai-exclude@"2.1.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/yfleury/.npm/_logs/2024-06-02T16_52_02_954Z-eresolve-report.txt

Details

  • CodeceptJS version: default branch
  • NodeJS Version: 20.14.0 (also tried with 18.20.3)
  • Operating System: MacOS Sonoma 14.5 (23F79)
@kobenguyent
Copy link
Collaborator

@Clindbergh
Copy link

The peer dependencies are not resolvable:

> pnpm view "codeceptjs@3.6.2" dependencies                  
{
  ...
  chai: '5.1.0',
  'chai-deep-match': '1.2.1',
  'chai-exclude': '2.1.0',
  'chai-json-schema': '1.5.1',
  'chai-json-schema-ajv': '5.2.4',
  'chai-match-pattern': '1.3.0',
  'chai-string': '1.5.0',
  ....
}

Codecept requires chai: 5.1.0 and chai-exclude: 2.1.0. However chai-exclude requires a chai version <5:

> pnpm view "chai-exclude@2.1.0" dependencies peerDependencies          
dependencies = { fclone: '^1.0.11' }
peerDependencies = { chai: '>= 4.0.0 < 5' }

@Horsty80
Copy link
Contributor

Horsty80 commented Jun 5, 2024

Hey @yoannfleurydev :) (I think we have met you at camping des speakers 2023 ✌️) anyway

Have you try npm install --force or npm install --legacy-peer-deps ?

I know it's not pnpm but some peerDependencies aren't working so you need to use npm with this flag 🥲

@yoannfleurydev
Copy link
Contributor Author

Hey @yoannfleurydev :) (I think we have met you at camping des speakers 2023 ✌️) anyway

Have you try npm install --force or npm install --legacy-peer-deps ?

I know it's not pnpm but some peerDependencies aren't working so you need to use npm with this flag 🥲

Hey @Horsty80 (yes, that's right, we have met 😉)
I forgot I opened that issue, I did it when @kobenguyent told me about that and it worked (after multiple tries and making sure I removed node_modules.

Thanks to you two for helping on that one, I'm closing this issue :)

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

4 participants