VirtusLab-Open-Source / strapi-plugin-comments

A plugin for Strapi Headless CMS that provides end to end comments feature with their moderation panel, bad words filtering, abuse reporting and more.
MIT License
405 stars 63 forks source link

[CU-2cwzjyr] Conflicting peer dependencies #136

Closed kwiat1990 closed 2 years ago

kwiat1990 commented 2 years ago

I got this error installing new version of the plugin:

ERESOLVE overriding peer dependency
npm WARN While resolving: graphql-iso-date@3.6.1
npm WARN Found: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN   graphql@"^15.5.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN     @strapi/plugin-graphql@"^4.1.8" from strapi-plugin-comments@2.1.0
npm WARN     node_modules/strapi-plugin-comments
npm WARN   19 more (@apollo/federation, @graphql-tools/schema, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-iso-date@3.6.1
npm WARN node_modules/graphql-iso-date
npm WARN   graphql-iso-date@"^3.6.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN 
npm WARN Conflicting peer dependency: graphql@14.7.0
npm WARN node_modules/graphql
npm WARN   peer graphql@"^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-iso-date@3.6.1
npm WARN   node_modules/graphql-iso-date
npm WARN     graphql-iso-date@"^3.6.1" from @strapi/plugin-graphql@4.1.8
npm WARN     node_modules/@strapi/plugin-graphql
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: graphql-type-long@0.1.1
npm WARN Found: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN   graphql@"^15.5.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN     @strapi/plugin-graphql@"^4.1.8" from strapi-plugin-comments@2.1.0
npm WARN     node_modules/strapi-plugin-comments
npm WARN   19 more (@apollo/federation, @graphql-tools/schema, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.9.1 || ^0.10.0 || ^0.12.0 || ^0.13.0" from graphql-type-long@0.1.1
npm WARN node_modules/graphql-type-long
npm WARN   graphql-type-long@"^0.1.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN 
npm WARN Conflicting peer dependency: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN   peer graphql@"^0.9.1 || ^0.10.0 || ^0.12.0 || ^0.13.0" from graphql-type-long@0.1.1
npm WARN   node_modules/graphql-type-long
npm WARN     graphql-type-long@"^0.1.1" from @strapi/plugin-graphql@4.1.8
npm WARN     node_modules/@strapi/plugin-graphql

removed 31 packages, changed 8 packages, and audited 1650 packages in 15s

143 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

I have removed node_modules and package.lock.json but the errors persists.

cyp3rius commented 2 years ago

@kwiat1990 Which plugin version? Can you share package json depts?

kwiat1990 commented 2 years ago

The error occurs using the newest version 2.1.0 as well as with the 2.0.10.

My dependencies are following:

"dependencies": {
    "@strapi/plugin-i18n": "^4.1.8",
    "@strapi/plugin-users-permissions": "^4.1.8",
    "@strapi/strapi": "^4.1.8",
    "pg": "^8.7.3",
    "strapi-plugin-comments": "^2.1.0",
    "strapi-plugin-placeholder": "^4.1.7",
    "strapi-plugin-slugify": "^2.2.1",
    "strapi-plugin-transformer": "^2.0.0"
  },

Strapi version seems to not have any impact on this behaviour. I've tested also 4.1.7.

cyp3rius commented 2 years ago

Will check that, we have got gql as dev dependency so it does not have any effect also. The only dependency is with Strapi GQL plugin.

A strange thing, anyway will check.

cyp3rius commented 2 years ago

@kwiat1990 I've published new version with some moves to peerDependencies. It's not causing the issue you described with all the plugins installed.

Version: 2.1.3

kwiat1990 commented 2 years ago

Great! I will check the new version this afternoon and I hope I’ll get the same results.

cyp3rius commented 2 years ago

if it will not work still, add "@strapi/plugin-graphql": "^4.1.7" or higher for your dependencies as that's the plugin requirement.

Use version 2.1.4 of the plugin.

kwiat1990 commented 2 years ago

The problem still occurs with the latest version and even with the addition of @strapi/plugin-graphql (4.1.8). npm install produces following output:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: graphql-iso-date@3.6.1
npm WARN Found: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN   graphql@"^15.5.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN     @strapi/plugin-graphql@"^4.1.8" from the root project
npm WARN     1 more (strapi-plugin-comments)
npm WARN   19 more (@apollo/federation, @graphql-tools/schema, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-iso-date@3.6.1
npm WARN node_modules/graphql-iso-date
npm WARN   graphql-iso-date@"^3.6.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN 
npm WARN Conflicting peer dependency: graphql@14.7.0
npm WARN node_modules/graphql
npm WARN   peer graphql@"^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-iso-date@3.6.1
npm WARN   node_modules/graphql-iso-date
npm WARN     graphql-iso-date@"^3.6.1" from @strapi/plugin-graphql@4.1.8
npm WARN     node_modules/@strapi/plugin-graphql
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: graphql-type-long@0.1.1
npm WARN Found: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN   graphql@"^15.5.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN     @strapi/plugin-graphql@"^4.1.8" from the root project
npm WARN     1 more (strapi-plugin-comments)
npm WARN   19 more (@apollo/federation, @graphql-tools/schema, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.9.1 || ^0.10.0 || ^0.12.0 || ^0.13.0" from graphql-type-long@0.1.1
npm WARN node_modules/graphql-type-long
npm WARN   graphql-type-long@"^0.1.1" from @strapi/plugin-graphql@4.1.8
npm WARN   node_modules/@strapi/plugin-graphql
npm WARN 
npm WARN Conflicting peer dependency: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN   peer graphql@"^0.9.1 || ^0.10.0 || ^0.12.0 || ^0.13.0" from graphql-type-long@0.1.1
npm WARN   node_modules/graphql-type-long
npm WARN     graphql-type-long@"^0.1.1" from @strapi/plugin-graphql@4.1.8
npm WARN     node_modules/@strapi/plugin-graphql

As long as everything works just fine it doesn't bother me a lot, so we could close this thread. Unless you would like to invest some more time in the bug fixing?

cyp3rius commented 2 years ago

Not critical ones and we're using Strapi plugins as dependencies so I would close it :)