strapi-community / strapi-plugin-publisher

A plugin for Strapi Headless CMS that provides the ability provides the ability to easily schedule publishing and unpublishing of any content type.
https://market.strapi.io/plugins/strapi-plugin-publisher
MIT License
48 stars 17 forks source link

Upstream dependency conflict #28

Closed BabyDino closed 2 years ago

BabyDino commented 2 years ago

When installing this plugin, I get the following dependency error:

~/dev/my-project$ npm install strapi-plugin-publisher
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: my-project@0.1.0
npm ERR! Found: react-router-dom@5.3.3
npm ERR! node_modules/react-router-dom
npm ERR!   peer react-router-dom@"^5.2.0" from @strapi/design-system@1.2.1
npm ERR!   node_modules/@strapi/design-system
npm ERR!     @strapi/design-system@"1.2.1" from @strapi/admin@4.3.6
npm ERR!     node_modules/@strapi/admin
npm ERR!       @strapi/admin@"4.3.6" from @strapi/strapi@4.3.6
npm ERR!       node_modules/@strapi/strapi
npm ERR!         peer @strapi/strapi@"^4.3.4" from @strapi/admin@4.3.6
npm ERR!         11 more (@strapi/plugin-graphql, @strapi/plugin-seo, ...)
npm ERR!     peer @strapi/design-system@"^1.2.0" from strapi-plugin-menus@1.0.2
npm ERR!     node_modules/strapi-plugin-menus
npm ERR!       strapi-plugin-menus@"^1.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! strapi-plugin-publisher@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react-router-dom@6.3.0
npm ERR! node_modules/react-router-dom
npm ERR!   peer react-router-dom@"^6.2.1" from strapi-plugin-publisher@1.1.3
npm ERR!   node_modules/strapi-plugin-publisher
npm ERR!     strapi-plugin-publisher@"*" 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.

Stapi version 4.3.6. Is this my setup or is it a problem with the plugin?

ComfortablyCoding commented 2 years ago

Most likely on the plugin side. I will have a look, probably needs a ^ prefix on a package version somewhere.

I believe if you install with npm install with the --legacy-peer-deps it should resolve this issue.

BabyDino commented 2 years ago

I've forked the project to do some research on my own. I am trying to get the plugin to work from a git repo clone but no luck yet. I am fairly new to Strapi and would like to contribute, but will take some time to get comfortable in the ecosystem.

Thanks for your hard work and hope this issue can be resolved.

cooperwfloyd commented 2 years ago

Here is the full conflict on my end. Seems like there is a conflict with Strapi's design system library @strapi/design-system. Would it be possible to update react-router-dom to be compatible with Strapi's version?

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: strapi-boilerplate@1.0.0
npm ERR! Found: react-router-dom@5.3.3
npm ERR! node_modules/react-router-dom
npm ERR!   peer react-router-dom@"^5.2.0" from @strapi/design-system@1.2.4
npm ERR!   node_modules/@strapi/design-system
npm ERR!     peer @strapi/design-system@"^1.1.0" from strapi-plugin-preview-button@0.3.6
npm ERR!     node_modules/strapi-plugin-preview-button
npm ERR!       strapi-plugin-preview-button@"^0.3.6" from the root project
npm ERR!     @strapi/design-system@"^1.2.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! strapi-plugin-publisher@"1.1.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react-router-dom@6.4.1
npm ERR! node_modules/react-router-dom
npm ERR!   peer react-router-dom@"^6.2.1" from strapi-plugin-publisher@1.1.3
npm ERR!   node_modules/strapi-plugin-publisher
npm ERR!     strapi-plugin-publisher@"1.1.3" 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.
ComfortablyCoding commented 2 years ago

Sorry about leaving this issue for so long, the next version should fix this. Will release it over the weekend.

cooperwfloyd commented 2 years ago

nice, thanks @ComfortablyCoding!

ComfortablyCoding commented 2 years ago

Just released 1.1.4 with the fix