Graham
Graham
Explore posts from servers
DTDrizzle Team
Created by Graham on 9/6/2023 in #help
Maximum call stack size exceeded: orderSelectedFields
Oh interesting, maybe so! When I was debugging I tried running sql"blahblah".getSQL() and got an error that getSQL didn't exist on the tagged template function. Would that happen if I was using cjs in an mjs environment or vice versa? (not sure which I'm in)
10 replies
DTDrizzle Team
Created by Graham on 9/6/2023 in #help
Maximum call stack size exceeded: orderSelectedFields
import { sql, eq, inArray, ... } from "@project/db" Which now reads import { drizzle } from "@project/db"
10 replies
DTDrizzle Team
Created by Graham on 9/6/2023 in #help
Maximum call stack size exceeded: orderSelectedFields
Figured the issue out, and it was strange. I have a monorepo with multiple projects, and I was exporting Drizzle helpers from my packages/db repo like so: export * from "drizzle-orm"; I guess that was breaking the sql helper class somehow. Changing the export to this—
import * as drizzle from "drizzle-orm";
export { drizzle };
import * as drizzle from "drizzle-orm";
export { drizzle };
And then calling drizzle.sql'...' seems to have fixed it.
10 replies