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ā€¢2mo 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 DMā€¢2mo 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ā€¢2mo ago
Same issue.
Mario564
Mario564ā€¢2mo 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ā€¢2mo ago
Same here! Studio stopped working, didn't make any changes to my schema.
haz | Will not DM
haz | Will not DMā€¢2mo 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ā€¢2mo 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 DMā€¢2mo ago
I have also tried this but the same error persists
Francis A.
Francis A.ā€¢2mo 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 DMā€¢2mo ago
hey, have you found a previous version which is working for you?
Francis A.
Francis A.ā€¢2mo ago
Sadly, no. šŸ˜¦
Mario564
Mario564ā€¢2mo 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 DMā€¢2mo 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
Want results from more Discord servers?
Add your server