mCaptcha / glue

glue code to setup mCaptcha on your website
7 stars 7 forks source link

upstream dependency conflict for react version 18.2.0 #63

Closed Paramesh98 closed 10 months ago

Paramesh98 commented 10 months ago
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from @mcaptcha/react-glue@0.1.0-rc2
npm ERR! node_modules/@mcaptcha/react-glue
npm ERR!   @mcaptcha/react-glue@"^0.1.0-rc2" 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.

Issue Description: Upstream Dependency Conflict using nextjs and @mcaptcha/react-glue

Problem: When attempting to install @mcaptcha/react-glue for Nextjs project without (legacy-peer-deps or force), an upstream dependency conflict is encountered.

Version: next - "13.4.0", react - "18.2.0", react-dom - "18.2.0", @mcaptcha/react-glue - "^0.1.0-rc2"

Steps to Reproduce:

  1. Create or navigate to a project that utilizes React version 18.2.0.
  2. Attempt to install "@mcaptcha/react-glue" version "^0.1.0-rc2" within this project using a package manager (e.g., npm or yarn).
  3. Observe installation errors or warnings regarding upstream dependency conflicts.
realaravinth commented 10 months ago

Thanks for the report!

I recently updated all the dependencies in this repo, and it looks like I missed out peerDependencies in the react-glue library. I've published @mcaptcha/react-glue@0.1.0-rc3 with this fix, and it seems to work on my machine.

I'm closing this issue, but feel free to re-open if the problem persists!


aside: I'm not a React dev, so I'd appreciate any feedback you might have regarding ergonomics of the react implementation :)

Paramesh98 commented 10 months ago

Thanks for the report!

I recently updated all the dependencies in this repo, and it looks like I missed out peerDependencies in the react-glue library. I've published @mcaptcha/react-glue@0.1.0-rc3 with this fix, and it seems to work on my machine.

I'm closing this issue, but feel free to re-open if the problem persists!

aside: I'm not a React dev, so I'd appreciate any feedback you might have regarding ergonomics of the react implementation :)

Thank you for the quick solution. It works perfectly fine.