Type Error with zodValidator and arktypeValidator
Basically I have this
and I have this error
I get the same error with
zodValidator
I've tried it.11 Replies
here's my package.json
I'm using bun and a monorepo setup
I've used
BHVR
stack to initialize the repo.
if anyone have an idea on why I have this error or a solution that would be great.
the api works fine I've tested it with curl
here's a screenshot from my editor

can you share your tsconfig?
hm. i can't repro
try getting rid of the
APIResponse
import, for science
fwiw, i'd recommend using generic instead of casting:
these are my deps; might be worth using defined versions:
i'm on bun 1.2.13
, though that shouldn't make a difference
out of curiosity, why are you using typescript instead of bun to build?
and does the error come up when building, or is it shown in your IDE?did you try to create the app with
bun create bhvr@latest
?
this is supposed to be a template ready to use I didn't configure it or add anything just was trying
I'm on bun 1.2.18
The type error is in both the IDE and the tsc when building.
I'm not sure if there's something wrong the the monorepo setup but I don't think so
since is so minimal and contains almost nothing
I tried your deps, removed the node_modules
and reinstalled everything and still the same error :/i hadnt. i can repro with a new
bhvr
project
no idea, tbh. best guess is that it has something to do with how turbo manages deps or types
yep, can confirm
if you move the @hono/arktype-validator
package from the root-level node modules to the server-specific node modules, there's no errorThey've updated the project to use turbo, I'm on an older version that doesn't use trubo
I guess the problem is related to monorepo and not specific to the
BHVR
stack
Do you have any ideas on how can I solve this instead of just moving packages from folder to folder?
I think I found a fix
I deleted the the bun.lock
files and node_modules
and reinstalled everything and it worked
if you can confirm it I'll make an issue on the bhvr
github repoit seems to work 🤷♂️
thank you for your help ❤️
np!