haz | Will not DM
haz | Will not DM
DTDrizzle Team
Created by haz | Will not DM on 8/13/2024 in #help
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
29 replies