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
404 stars 63 forks source link

react-dom issue with Strapi 4.13.1 #228

Closed BabyDino closed 10 months ago

BabyDino commented 10 months ago

When installing Strapi 4.13.1 (security fixes) I get a react-dom error. When trying to --force install the package I get the following warnings:

$ npm i --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-dom@18.2.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@">=16.8.0" from @emotion/react@11.11.1
npm WARN   node_modules/@emotion/react
npm WARN     @emotion/react@"^11.8.1" from react-select@5.7.0
npm WARN     node_modules/react-select
npm WARN   81 more (@emotion/use-insertion-effect-with-fallbacks, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.2.0" from react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"^18.2.0" from the root project
npm WARN   40 more (@floating-ui/react-dom, @monaco-editor/react, ...)
npm WARN 
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.2.0" from react-dom@18.2.0
npm WARN   node_modules/react-dom
npm WARN     react-dom@"^18.2.0" from the root project
npm WARN     40 more (@floating-ui/react-dom, @monaco-editor/react, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: strapi-plugin-comments@2.2.12
npm WARN Found: react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"^18.2.0" from the root project
npm WARN   40 more (@floating-ui/react-dom, @monaco-editor/react, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^17.0.2" from strapi-plugin-comments@2.2.12
npm WARN node_modules/strapi-plugin-comments
npm WARN   strapi-plugin-comments@"^2.2.12" from the root project
npm WARN 
npm WARN Conflicting peer dependency: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^17.0.2" from strapi-plugin-comments@2.2.12
npm WARN   node_modules/strapi-plugin-comments
npm WARN     strapi-plugin-comments@"^2.2.12" from the root project

Also discussed here: https://github.com/strapi/strapi/issues/17874

When trying to revert to 4.12.7 (and deleting node_modules, package-lock and cache) I also get the same errors.

cyp3rius commented 10 months ago

Investigating and bumping packages according to 4.13

cyp3rius commented 10 months ago

Version 2.2.13 release with dependencies upgrades. Should be working as expected. Tested with Strapi 4.13.1

BabyDino commented 10 months ago

Thanks, but I still get peer dependency problems?

npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-dom@18.2.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@">=16.8.0" from @emotion/react@11.11.1
npm WARN   node_modules/@emotion/react
npm WARN     @emotion/react@"^11.8.1" from react-select@5.7.0
npm WARN     node_modules/react-select
npm WARN   81 more (@emotion/use-insertion-effect-with-fallbacks, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.2.0" from react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"^18.2.0" from the root project
npm WARN   40 more (@floating-ui/react-dom, @monaco-editor/react, ...)
npm WARN 
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.2.0" from react-dom@18.2.0
npm WARN   node_modules/react-dom
npm WARN     react-dom@"^18.2.0" from the root project
npm WARN     40 more (@floating-ui/react-dom, @monaco-editor/react, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: strapi-plugin-comments@2.2.13
npm WARN Found: react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"^18.2.0" from the root project
npm WARN   40 more (@floating-ui/react-dom, @monaco-editor/react, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^17.0.2" from strapi-plugin-comments@2.2.13
npm WARN node_modules/strapi-plugin-comments
npm WARN   strapi-plugin-comments@"^2.2.13" from the root project
npm WARN 
npm WARN Conflicting peer dependency: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^17.0.2" from strapi-plugin-comments@2.2.13
npm WARN   node_modules/strapi-plugin-comments
npm WARN     strapi-plugin-comments@"^2.2.13" from the root project
cyp3rius commented 10 months ago

Yep, recognized just after publish. New version on a way.

cyp3rius commented 10 months ago

2.2.14 got peer dependencies cleaned as well

BabyDino commented 10 months ago

This seems to work :) Thanks a million!