reference fails with Cannot read properties of undefined (reading 'id')

I have a foreign key reference that will not resolve. It seems that the other pgTable is undefined when it tries to resolve. I used madge to check and i have no circular dependencies. Does anyone have a strategy for how to find my error?
4 Replies
TOSL
TOSL3w ago
You have to share the schema.
patrick
patrickOP3w ago
i figured, unfortunately it's large and complex... which is the likely cause of my issue... if i knew which parts to cut it down to to share an example, then i'd probably know what the issue was!
TOSL
TOSL3w ago
Share the whole error message And any queries What about it being large means you can't post it? Some kind of character limit? https://www.drizzle.run make a recreation
patrick
patrickOP3w ago
when they are all in the same file in drizzle.run, it's fine. but i have each schema in its own .ts file... i'll try to make a smaller reproducible case...

Did you find this page helpful?