Introspection fails sonb_build_array(" is not valid JSON

I'm trying to switch from prisma to drizzle. To begin, I've tried introspecting my database, but it fails with an error sonb_build_array(" is not valid JSON. No logs either. Any idea what could be causing this
npx drizzle-kit introspect

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/wilson/Developer/Projects/senja/apps/api/drizzle.config.ts'
Pulling from ['public'] list of schemas

Using 'postgres' driver for database querying
[✓] 49 tables fetched
[⣟] 471 columns fetching
[✓] 0 enums fetched
[⣟] 0 indexes fetching
[⣟] 9 foreign keys fetching
undefined:1
sonb_build_array(
^

SyntaxError: Unexpected token 's', "sonb_build_array(" is not valid JSON
at JSON.parse (<anonymous>)
at defaultForColumn (/Users/wilson/Developer/Projects/senja/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19380:55)
npx drizzle-kit introspect

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/wilson/Developer/Projects/senja/apps/api/drizzle.config.ts'
Pulling from ['public'] list of schemas

Using 'postgres' driver for database querying
[✓] 49 tables fetched
[⣟] 471 columns fetching
[✓] 0 enums fetched
[⣟] 0 indexes fetching
[⣟] 9 foreign keys fetching
undefined:1
sonb_build_array(
^

SyntaxError: Unexpected token 's', "sonb_build_array(" is not valid JSON
at JSON.parse (<anonymous>)
at defaultForColumn (/Users/wilson/Developer/Projects/senja/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19380:55)
3 Replies
WilsonSquared
WilsonSquaredOP4mo ago
Works again with "drizzle-kit": "^0.22.0",
Kevin Wolf
Kevin Wolf3mo ago
I had the same error on 0.24.2, had to downgrade to 0.22.0
Kevin Wolf
Kevin Wolf3mo ago
Now the error is that jsonb_build_array() does not exist or is not getting imported into the generated schema file.
No description
Want results from more Discord servers?
Add your server