-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module '@kitajs/html/jsx-runtime' or its corresponding type declarations. #150
Comments
same problem p.s. make new release please, I need alpine support, I see it's already done |
I have the same problem. Very basic setup with express and @kitajs/html. Using The alternative configuration method seems to work fine.
|
The main branch contains unreleased changes. Please browse the readme for the last released version: v3.1.2 |
@joncys is there some blocker to release this changes? may be I can help and do some PR's now I'm forced to build it myself with pnpm --prod deploy to my project node_modules and it make everything very complex i wanted to temporary just copy code to ./src/lib and setup it from here, but tsconfig jsxImportSource requires it to be a package in node_modules and cant work with relative path to source code, so everything became very problematic: ci/cd, explaing to teammates how to set it up can I help somehow so you release it |
I did, but it says nothing about how to build main branch with unreleased changes to have alpine support in my project. |
Copy this file into your definitions: https://github.com/kitajs/html/blob/master/packages/html/alpine.d.ts |
Hey @joncys @FedericoBiccheddu @anravell I just released
|
Now it works, thank you Arthur! |
@arthurfiorette thank you! |
I'm using Bun and it's saying |
Hey @7f8ddd, can you show your tsconfig? |
I think a Bun issue needs to be made, it's a Bun specific problem. I worked around it by just copying the jsx-dev-runtime file and changing the export at the very bottom from jsx to jsxDEV:jsx. |
@arthurfiorette I feel that we should export both jsx and jsxDEV functions from the jsx-runtime file and also create a jsx-dev-runtime file. They should have the same signature, this should be an easy thing to do. @7f8ddd you should open an issue to Bun about this. Bun should handle the difference between dev and prod when it bundles. For this library, the difference is zero but for something like React you should not use the dev mode in a prod build. |
Sure, this is probably the correct way to solve this. However, I made some tests a week ago, and this scared me a little bit. Bun was rendering objects in production mode, even for KitaJS. Just like as if bun in prod mode was react-only compatible. More tests using bun should be made, and probably also setup a CI for It. |
Let's talk about it at #159. |
Prerequisites
Versions
Description
jsx-runtime
is not installed/present in thehtml
package.Steps to Reproduce
tsconfig.json
:README
:Cannot find module '@kitajs/html/jsx-runtime' or its corresponding type declarations.ts(2307)
Error: Cannot find module '@kitajs/html/jsx-runtime'
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: