introspection fails (Supabase)

I've got a large application originally written w/ nextjs and prisma, but due to it being large, the performance has massively reduced, so I'm doing a rewrite of the customer facing part in svelte and drizzle, I want to leave the primary db changes in the main app, but want to use drizzle for this so I can deploy on the edge... When I do npx drizzle-kit introspect I get back:
drizzle-kit: v0.21.1
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Volumes/Primary/Code/eatess/cruncho-menu/drizzle.config.ts'
Pulling from ['public'] list of schemas

Using 'postgres' driver for database querying
[✓] 39 tables fetched
[⣟] 310 columns fetching
[✓] 24 enums fetched
[⣟] 0 indexes fetching
[⣟] 25 foreign keys fetching
/Volumes/Primary/Code/eatess/cruncho-menu/node_modules/drizzle-kit/bin.cjs:15899
const onUpdate = fk4.update_rule.toLowerCase();
^

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at /Volumes/Primary/Code/eatess/cruncho-menu/node_modules/drizzle-kit/bin.cjs:15899:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.1.0
drizzle-kit: v0.21.1
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Volumes/Primary/Code/eatess/cruncho-menu/drizzle.config.ts'
Pulling from ['public'] list of schemas

Using 'postgres' driver for database querying
[✓] 39 tables fetched
[⣟] 310 columns fetching
[✓] 24 enums fetched
[⣟] 0 indexes fetching
[⣟] 25 foreign keys fetching
/Volumes/Primary/Code/eatess/cruncho-menu/node_modules/drizzle-kit/bin.cjs:15899
const onUpdate = fk4.update_rule.toLowerCase();
^

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at /Volumes/Primary/Code/eatess/cruncho-menu/node_modules/drizzle-kit/bin.cjs:15899:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.1.0
Whenever I rerun the command, the number of tables/columns it completes changes every time, sometimes it's 200 or so columns, sometimes it's more. Any idea what I'm missing?
2 Replies
shot
shot6mo ago
I am getting this as well @mr nooli you can see here https://github.com/drizzle-team/drizzle-orm/issues/2338 -- apparently switching up the ports can do the trick. I was able to get it to work by changing the driver from postgres to pg
mr nooli
mr nooliOP6mo ago
Thanks! I’ve ended up adding it back to the NextJS platform so I’m not running into it anymore!
Want results from more Discord servers?
Add your server