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

Unable to resolve dependency #108

Open
JoaquimEsteves opened this issue Mar 26, 2021 · 1 comment
Open

Unable to resolve dependency #108

JoaquimEsteves opened this issue Mar 26, 2021 · 1 comment

Comments

@JoaquimEsteves
Copy link

Hullo, recently tried to add this plugin to a project only to be faced with some
dependency issue shenanigans

Error Log:
$ npm install --save-dev eslint-plugin-you-dont-need-momentjs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: <Project Name>
npm ERR! Found: eslint@7.22.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^7.19.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.5.0" from eslint-plugin-you-dont-need-momentjs@1.6.0
npm ERR! node_modules/eslint-plugin-you-dont-need-momentjs
npm ERR!   dev eslint-plugin-you-dont-need-momentjs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I don't particularly feel like forcing the install, and help would be appreciated.

@EmilyRosina
Copy link

For anyone still frustrated by this, here's one option using npm:

Add this to package.json

  "overrides": {
    "eslint-plugin-you-dont-need-momentjs": {
      "eslint": "$eslint"
    }
  }

What this does:
Overrides the version of eslint as defined eslint-plugin-you-dont-need-momentjs under peerDependencies.eslint.

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

2 participants