r9d7
Explore posts from serversDTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
Not the best solution for my project but I just finished refactoring so the app doesn't crash anymore...
11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
I tried running pnpm db:push with both
export const
and export let
for every table
& relation
but those would always crash11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
What ended up working for me was moving every table & relation definition to one schema.ts file, and making sure to
export var
everything11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
This is the most likely cause but I tested my code with
madge
but it didn't find any circular dependency11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
I tried that with no success 😦
11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
And this is the error I get when I run
pnpm db:push
:
11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
But I never import a
.relation.schema
file from a .schema
file, only the other way around11 replies
DTDrizzle Team
•Created by r9d7 on 9/23/2024 in #help
Error: Cannot access 'interactionsRelations' before initialization
A
.relation.schema
file can reference .schema
files like so:
11 replies