comatory
comatory
HHono
Created by comatory on 2/17/2025 in #help
Cannot resolve React with hono/jsx
I added reproducible steps: https://github.com/honojs/hono/issues/3931 Maybe someone will notice something strange in that setup, otherwise I'll dig deeper later on. It might be Nx misconfiguration too 🤞
9 replies
HHono
Created by comatory on 2/17/2025 in #help
Cannot resolve React with hono/jsx
OK, after further experimentation, the issue is probably with wrangler, both for local development and deployment. If I pass flag wrangler dev --tsconfig=tsconfig.lib.json in my project directory, it loads up fine. But something is definitely not right, I should not be required to do this. I think I will need to take this discussion to Nx instead.
9 replies
HHono
Created by comatory on 2/17/2025 in #help
Cannot resolve React with hono/jsx
It's just how Nx works, it is for managing big monorepos. This complexity helps with speed as your codebase grows. You don't want to load unnecessary files when you're building or type-checking.
Is it possible that hono/jsx is somehow hardcoded to only look for tsconfig.json specifically?
It seems like my project references are not resolved by Hono and I'm not sure why. Maybe it's not Hono related at all (I wouldn't be surprised). compilerOptions are just Typescript, however I'm getting error during runtime:
ReferenceError: React is not defined
ReferenceError: React is not defined
I'm using Hono with Cloudflare workers, the app is running via wrangler dev on local machine but it also fails when deployed.
9 replies