honojs / middleware

monorepo for Hono third-party middleware/helpers/wrappers
https://hono.dev
395 stars 138 forks source link

react-compat package version #630

Open BarryThePenguin opened 1 month ago

BarryThePenguin commented 1 month ago

Would it be possible to release a version of @hono/react-compat so that it is compatible with packages like @hono/auth-js?

@hono/auth-js has a peer dependency for react>=18

https://github.com/honojs/middleware/blob/72d591aa359dff50218162c3c479b713c098fe1e/packages/auth-js/package.json#L54-L58

Otherwise installing @hono/auth-js will run into issues with  ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

 @hono/auth-js 1.0.10
  └ ✕ unmet peer react@>=18: found 0.0.1

https://github.com/honojs/middleware/blob/72d591aa359dff50218162c3c479b713c098fe1e/packages/react-compat/package.json#L4

yusukebe commented 1 month ago

Hi @BarryThePenguin

Deos it mean this error?

CleanShot 2024-07-18 at 18 03 06@2x

BarryThePenguin commented 1 month ago

Yes, that's the one! 👍🏻

Specifically when installing with pnpm and strict-peer-dependencies=true

I currently have that disabled, but having the correct peer dependencies installed helps prevent issues with transient dependencies

yusukebe commented 1 month ago

@BarryThePenguin Thanks!

Hmmm. Now I don't have a solution.

@gaetan-puleo Do you have any thoughts?

BarryThePenguin commented 1 month ago

Because it is installed as an alias, maybe releasing a version 18.0.0 might work?

Alternatively, it may be a bug with how npm or pnpm install an alias, or how they resolve peer dependencies using an alias?

https://github.com/pnpm/pnpm/issues/4301 looks related 👀

gaetan-puleo commented 1 month ago

@gaetan-puleo Do you have any thoughts?

Nop :(

Alternatively, it may be a bug with how npm or pnpm install an alias, or how they resolve peer dependencies using an alias?

pnpm/pnpm#4301 looks related 👀

I found this issue too trying to search for a solution