Import problem with drizzle-kit generate
I'm migrating from TypeORM to Drizzle in my Node.js project to manage player data, but I'm facing an issue. I have created schemas in a folder to manage all of them, for example, core/schemas/*.schema.ts.
Some schemas need to use interfaces or types from my project or platform node modules. For example, I created a custom type for Vector3 from alt-server as follows:
Custom type code:
Schema code:
When I run drizzle-kit generate to generate SQL files for all the schemas, I get the following error:
Even if I use declare module or define the Vector3 class directly in the schema, I still encounter this issue when importing custom interfaces from other places. In short, I am unable to import external code.
1 Reply
is there have some solutions to fix them, I am wanna use import external stuffs, if I split these interface or something to schema files, the future db structure will be hard to manage
still need help