The '@zodios/core' library may need to update its package.json or typings.
mjperrone opened this issue · 2 comments
mjperrone commented
Hello!
I am using https://github.com/astahmer/openapi-zod-client to generate zod schemas, and the resulting files have lines like:
import { makeApi, Zodios, type ZodiosOptions } from '@zodios/core';
My package.json
includes
"dependencies": {
"@zodios/core": "10.3.1",
and when I compile the resultant typescript code, I get the following error:
src/openapi-generated/zod.ts:1:53 - error TS7016: Could not find a declaration file for module '@zodios/core'. '/Users/mperrone/code/repo/node_modules/@zodios/core/lib/index.mjs' implicitly has an 'any' type.
There are types at '/Users/mperrone/code/repo/node_modules/@zodios/core/lib/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@zodios/core' library may need to update its package.json or typings.
1 import { makeApi, Zodios, type ZodiosOptions } from '@zodios/core';
I'm not 100% sure I understand this error, but it seems like tsc is telling me there's a problem with the way @zodios/core is configuring the types package.json. Can you help me understand this?
ecyrbe commented
update to v10.9.4
that has support for mjs.
mjperrone commented
Whoops, wasn't on latest. Thanks for pointing that out!