-
Notifications
You must be signed in to change notification settings - Fork 197
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
Importing @hono/zod-openapi in cloudflare worker vitest environment fails #436
Comments
Hi @JonasHiltl Thanks for raising the issue and creating the repro. I've released the new version of
|
This issue has been fixed completely with the new version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cloudflare recently announced their new testing integration with vitest to test workers directly in a workers environment.
When trying it out myself I stumbled about this bug caused by
@hono/zod-openapi
because it can't import@hono/zod-validator
. But if you look closely at the error message you can see that@hono/zod-openapi
tries to import@hono/zod-validator
from.../dist/@hono/zod-validator
but that path is wrong, since dependencies are not located indist
.Here is a minimal repo to reproduce the bug.
The bug is caused by just importing from
@hono/zod-openapi
, so this is enoughThis smells like an
esm
error to me, but I'm not sure why it searches for the dependency indist
🤷♂️The text was updated successfully, but these errors were encountered: