Latest update has broken studio

Hi! Today after updating to the latest version, my studio launches but I cannot access it anymore. Here is the stack trace
TypeError: Cannot read properties of undefined (reading 'tables')
at https://local.drizzle.studio/index.js:12873:27177
at Array.forEach (<anonymous>)
at https://local.drizzle.studio/index.js:12873:27062
at Array.forEach (<anonymous>)
at https://local.drizzle.studio/index.js:12873:27021
at Array.forEach (<anonymous>)
at sii (https://local.drizzle.studio/index.js:12873:26986)
at tAl (https://local.drizzle.studio/index.js:13147:11192)
TypeError: Cannot read properties of undefined (reading 'tables')
at https://local.drizzle.studio/index.js:12873:27177
at Array.forEach (<anonymous>)
at https://local.drizzle.studio/index.js:12873:27062
at Array.forEach (<anonymous>)
at https://local.drizzle.studio/index.js:12873:27021
at Array.forEach (<anonymous>)
at sii (https://local.drizzle.studio/index.js:12873:26986)
at tAl (https://local.drizzle.studio/index.js:13147:11192)
Im not sure what has caused this issue to happen now. Ive tested with a very simple schema here and this issue persists
import { sql, relations } from "drizzle-orm";
import {
index,
pgTableCreator,
serial,
text,
timestamp,
varchar,
uuid,
pgEnum,
bigint,
pgTable,
pgSchema,
numeric,
jsonb,
} from "drizzle-orm/pg-core";

export const createTable = pgTableCreator((name) => `${name}`);

export const user = createTable(
"user",
{
id: uuid("id").primaryKey().defaultRandom(),
name: varchar("name", { length: 256 }),
nonce: text("nonce").notNull(),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updated_at")
.notNull()
.$onUpdate(() => new Date()),
},
(example) => ({
nameIndex: index("name_idx").on(example.name),
}),
);
import { sql, relations } from "drizzle-orm";
import {
index,
pgTableCreator,
serial,
text,
timestamp,
varchar,
uuid,
pgEnum,
bigint,
pgTable,
pgSchema,
numeric,
jsonb,
} from "drizzle-orm/pg-core";

export const createTable = pgTableCreator((name) => `${name}`);

export const user = createTable(
"user",
{
id: uuid("id").primaryKey().defaultRandom(),
name: varchar("name", { length: 256 }),
nonce: text("nonce").notNull(),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updated_at")
.notNull()
.$onUpdate(() => new Date()),
},
(example) => ({
nameIndex: index("name_idx").on(example.name),
}),
);
Any help would be appreciated as to why this issue has arisen
25 Replies
Ed
Edā€¢4mo ago
i'm having a similar issue but Studio is broken. This is what I see: Error: The result contains the unsupported data type "CHAR". at ie (https://local.drizzle.studio/index.js:13147:10689) at async https://local.drizzle.studio/index.js:13147:10834 at async Promise.all (index 2) at async rni (https://local.drizzle.studio/index.js:12972:1418) at async tAl (https://local.drizzle.studio/index.js:13147:10815)
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
yes, what ever recent updates that were released have made it impossible to run studio I will continue to look into this issue and post my findings here
elliott.eth
elliott.ethā€¢4mo ago
Same issue.
Mario564
Mario564ā€¢4mo ago
Hi there. The error stack trace is pretty vague so it's a bit hard to figure out the root cause of the issue, but I'll try to help. Does it work if you don't export the createTable const?
KaiTakami
KaiTakamiā€¢4mo ago
Same here! Studio stopped working, didn't make any changes to my schema.
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
Hey! Let me make that adjustment and let you know, and yes the stack trace is very limited, also when exporting the error it provides no more context the same issue persists with direct table creation
Mario564
Mario564ā€¢4mo ago
I see. I also noticed that a lot of other users have reported the same issue regardless of schema or config, so this might something the Drizzle team has to look into to patch
šŸ‡ØšŸ‡­ Marko Bolliger <cannap>
i had something was not loading then i deleted node_modules folder
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
I have also tried this but the same error persists
Francis A.
Francis A.ā€¢4mo ago
Hello! i'm also having this problem with the Studio. I tried previous versions of Drizzle-kit and Orm and reinstalling node modules. Using PostgreSQL and at the moment, drizzle-kit: ^0.24.0, drizzle-orm: ^0.33.0
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
hey, have you found a previous version which is working for you?
Francis A.
Francis A.ā€¢4mo ago
Sadly, no. šŸ˜¦
Mario564
Mario564ā€¢4mo ago
@haz | Will not DM In the initial message in this thread, you sent your schema. Is that all there is to it? Asking because I'll forward this to one of the Drizzle team members but they need a schema to reproduce the issue and was thinking of using the simple one you created
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
yep that is the entire schema used in this test I also have another longer schema used which gives the same error, I can send in a dm if you like
Mario564
Mario564ā€¢4mo ago
If you can provide it, that'd be great!
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
sent in DM šŸ‘
Mario564
Mario564ā€¢4mo ago
I've forwarded this to the team, should hopefully be fixed soon
āš”Z.E.U.Sāš”
@haz | Will not DM Hey! Does your database have other tables that are not in the Drizzle schema?
vkongv
vkongvā€¢4mo ago
saw another person reporting the same issue, we both use supabase, and hitting the same issue: https://discord.com/channels/1043890932593987624/1124768693549797416/1274563848824950794
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
Hi! I have tried a few different schemas with the same outcome. I am also using Supabase for the PostgresSQL database provider. Here is a schema I am also having the same error with attached as message
āš”Z.E.U.Sāš”
@vkongv @haz | Will not DM @Francis A. @KaiTakami @elliott.eth @Ed Hi! This should be fixed, try it.
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
great, confirmed this is now fixed
Francis A.
Francis A.ā€¢4mo ago
its working! thanks!
haz | Will not DM
haz | Will not DMOPā€¢4mo ago
great I will close this post now
Want results from more Discord servers?
Add your server