ERR_MODULE_NOT_FOUND while generating migration files

import type { Config } from 'drizzle-kit';

export default {
schema: './lib/db/schema/*',
out: './migrations'
} satisfies Config;
import type { Config } from 'drizzle-kit';

export default {
schema: './lib/db/schema/*',
out: './migrations'
} satisfies Config;
I have imported one schema file into another for an fk relationship. When I run the generate command, I get the following error Error [ERR_MODULE_NOT_FOUND]: Cannot find module
2 Replies
Andrii Sherman
Can you share your setup? Where do you run drizzle-kit from? Do you have monorepo?
Amal
AmalOP2y ago
Yes, we have a monorepo.
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/.../project/packages/core/lib/db/schema/auth' imported from /Users/.../project/packages/core/lib/db/schema/organization.ts
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/.../project/packages/core/lib/db/schema/auth' imported from /Users/.../project/packages/core/lib/db/schema/organization.ts
The path exists, however it reports this error
Want results from more Discord servers?
Add your server