The inferred type of '<tableName>' cannot be named without a reference to '.pnpm/[email protected]
I'm trying to use the
drizzle-zod
but I keep getting this error...
Any idea on where it comes from ?
Thank you !2 Replies
Here's what's throwing the error;
export const accountsInsertSchema = createInsertSchema(accounts);
With accounts
being a pgTable (defined without error).
Here are my versions;
Ok I made it work;
DISCLAIMER -> I'm using turborepo
I uninstalled drizzle-zod
globally, but installed it locally in my packages/database
(ie. subfolder where my tables, types are defined)
------
But for the createInsertSchema
I now got the following error
Did you try solutions from this thread? https://github.com/microsoft/TypeScript/issues/42873
I'm not sure what may cause it.
GitHub
The inferred type of "X" cannot be named without a reference to "Y"...
Bug Report 🔎 Search Terms inferred type cannot be named, symlink node_modules 🕗 Version & Regression Information I'm verifying the problem on the [email protected]. I've not tried older ...