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 dependency conflict #29

Open
ulfgebhardt opened this issue Dec 12, 2023 · 0 comments
Open

NPM dependency conflict #29

ulfgebhardt opened this issue Dec 12, 2023 · 0 comments

Comments

@ulfgebhardt
Copy link

Preventing to require npm install --legacy-peer-deps when having output like this:

image

npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-plugin-type-graphql@1.0.0
npm WARN Found: @typescript-eslint/parser@6.13.2
npm WARN node_modules/@typescript-eslint/parser
npm WARN   dev @typescript-eslint/parser@"^6.13.1" from the root project
npm WARN   1 more (@typescript-eslint/eslint-plugin)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @typescript-eslint/parser@"^4.0.0" from eslint-plugin-type-graphql@1.0.0
npm WARN node_modules/eslint-plugin-type-graphql
npm WARN   dev eslint-plugin-type-graphql@"^1.0.0" from the root project
npm WARN 
npm WARN Conflicting peer dependency: @typescript-eslint/parser@4.33.0
npm WARN node_modules/@typescript-eslint/parser
npm WARN   peer @typescript-eslint/parser@"^4.0.0" from eslint-plugin-type-graphql@1.0.0
npm WARN   node_modules/eslint-plugin-type-graphql
npm WARN     dev eslint-plugin-type-graphql@"^1.0.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-plugin-type-graphql@1.0.0
npm WARN Found: eslint@8.55.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^8.54.0" from the root project
npm WARN   20 more (@eslint-community/eslint-plugin-eslint-comments, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from eslint-plugin-type-graphql@1.0.0
npm WARN node_modules/eslint-plugin-type-graphql
npm WARN   dev eslint-plugin-type-graphql@"^1.0.0" from the root project
npm WARN 
npm WARN Conflicting peer dependency: eslint@7.32.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from eslint-plugin-type-graphql@1.0.0
npm WARN   node_modules/eslint-plugin-type-graphql
npm WARN     dev eslint-plugin-type-graphql@"^1.0.0" from the root project

(this was generated running npm audit fix --force)

This is my package.json:

{
 ...
  "devDependencies": {
    ... 
    "@typescript-eslint/eslint-plugin": "^6.13.1",
    "@typescript-eslint/parser": "^6.13.1",
    "eslint": "^8.54.0",
    ...
    "jest": "^29.7.0",
    ...
  },
  ...
  "overrides": {
    "eslint-plugin-type-graphql": {
      "@typescript-eslint/parser": "$@typescript-eslint/parser",
      "eslint": "$eslint"
    }
  }
}

This part resolves the problematic peer dependencies properly:

"overrides": {
    "eslint-plugin-type-graphql": {
      "@typescript-eslint/parser": "$@typescript-eslint/parser",
      "eslint": "$eslint"
    }
  }

This solution was found from this source

This error occurred here: IT4Change/boilerplate-backend#8

Consider to close this Issue as soon as the peer dependecies are updated - this is just so you can google the problem and find a solution ❤️

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