react-compat package version
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
Hi @BarryThePenguin
Deos it mean this error?
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
@BarryThePenguin Thanks!
Hmmm. Now I don't have a solution.
@gaetan-puleo Do you have any thoughts?
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 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
Closing this because it doesn't affect me anymore
I have similar warning:
WARN Issues with peer dependencies found
apps/website
└─┬ @pkg-org/pkg-with-react-dep 1.0.0
├── ✕ unmet peer react@"^18.0.0 || ^19.0.0": found 0.0.3
├── ✕ unmet peer react-dom@"^18.0.0 || ^19.0.0": found 0.0.3
└─┬ react-usestateref 1.0.9
└── ✕ unmet peer react@>16.0.0: found 0.0.3
Because it is installed as an alias, maybe releasing a version 18.0.0 might work?
Releasing @hono/react-compat with react compatible version seems like a good solution.
If you think about it, alias is supposed to be drop-in replacement for a given package, so it's understandable, that package manager is complaining about version mismatch. People will usually use a fork as an alias, which will follow upstream versioning.
It looks like Hono claims compat with react 19: https://github.com/honojs/hono/blob/4960c063938763a9344c554286e72dcd2545b751/src/jsx/base.ts#L442