Studio stopped working after update to latest stable versions of kit and ORM

I'm on the latest stable versions: "drizzle-orm": "^0.44.2" "drizzle-kit": "0.31.2" After updating today, studio no longer works. Upon running, the instance displays this error: Drizzle Studio requires a new version of Drizzle Kit. Please install the latest version and try again. Any idea how to resolve? Thanks.
No description
53 Replies
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
@Budi Hey! Should be fixed.
Siddharth Pant
Siddharth Pant4mo ago
Error still persists even downgrading to v0.31.1 not helping and I am getting new error after doing that:
No description
wicod
wicod4mo ago
same, issue still persists for me ├── drizzle-kit@0.24.2 ├── drizzle-orm@0.33.0
No description
madhur
madhur4mo ago
+1 same issue here for a while now. drizzle-orm: 0.44.2 drizzle-kit: 0.31.1
wicod
wicod4mo ago
@madhur do you use neon db by any chance? or other db provider
madhur
madhur4mo ago
I'm running it on a postgres docker container.
Camizz
Camizz4mo ago
i'm using neon db
wicod
wicod4mo ago
thanks Camizz it seems this is a drizzle isolated thing, not neon seeing it's also happening to madhur, hopefully there's a fix soon
Camizz
Camizz4mo ago
I hope we find a resolution soon, I need to do some checks on my schema
wicod
wicod4mo ago
nah chill, dev is sleeping he will wake up soon
wicod
wicod4mo ago
a github issue has been opened on this https://github.com/drizzle-team/drizzle-orm/issues/4670 in case it gets more attention there
GitHub
[BUG]: Drizzle ORM showing the error -> n.trimChar is not a functio...
Report hasn't been filed before. I have verified that the bug I'm about to report hasn't been filed before. What version of drizzle-orm are you using? 0.44.2 What version of drizzle-kit...
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
It seems the error remains due to the cache. Try a hard refresh.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
No description
madhur
madhur4mo ago
@⚡Z.E.U.S⚡ @wicod @<Camizz /> I did the following on my end: 1. Deleted node modules 2. Made changes in package.json to the following by removing the ^:
"drizzle-orm": "0.44.2"
"drizzle-kit": "0.31.1"
"drizzle-orm": "0.44.2"
"drizzle-kit": "0.31.1"
3. Ran npm install and reseeded my local database. 4. Ran npx drizzle-kit studio and did a hard refresh to clear cache. It's working now.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Only step 4 is needed to solve this problem.
Budi
BudiOP4mo ago
Nice this is now fixed for me. What changed?
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Taken alternation engine from Drizzle Kit, added RLS and Schema Studio where you can manage your database entities.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
No description
Camizz
Camizz4mo ago
It worked, thank you very much indeed s2 Thanks
Budi
BudiOP4mo ago
Oh that's cool. Thanks! The enum viewer is awesome
rontheline
rontheline4mo ago
Hi, having the same issue here, did open a help chat too #Issue with Drizzle Kit, same issue as @Budi
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
@rontheline
rontheline
rontheline4mo ago
oh, must of scrolled past that 2 seconds, will try that now same issue, deleted cache and cookies
ReferenceError: CompressionStream is not defined
at compress2 (/Users/rv/Projects/evans-carcare/node_modules/drizzle-kit/bin.cjs:91129:28)

91124 | const accepted = ctx.req.header("Accept-Encoding");
91125 | const encoding = (options == null ? void 0 : options.encoding) ?? ENCODING_TYPES.find((encoding2) => accepted == null ? void 0 : accepted.includes(encoding2));
91126 | if (!encoding || !ctx.res.body) {
91127 | return;
91128 | }
91129 | const stream = new CompressionStream(encoding);
^
ReferenceError: CompressionStream is not defined
at compress2 (/Users/rv/Projects/evans-carcare/node_modules/drizzle-kit/bin.cjs:91129:28)
ReferenceError: CompressionStream is not defined
at compress2 (/Users/rv/Projects/evans-carcare/node_modules/drizzle-kit/bin.cjs:91129:28)

91124 | const accepted = ctx.req.header("Accept-Encoding");
91125 | const encoding = (options == null ? void 0 : options.encoding) ?? ENCODING_TYPES.find((encoding2) => accepted == null ? void 0 : accepted.includes(encoding2));
91126 | if (!encoding || !ctx.res.body) {
91127 | return;
91128 | }
91129 | const stream = new CompressionStream(encoding);
^
ReferenceError: CompressionStream is not defined
at compress2 (/Users/rv/Projects/evans-carcare/node_modules/drizzle-kit/bin.cjs:91129:28)
only thing i get back as some type of error
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Are you using monorepo?
rontheline
rontheline4mo ago
yes was waiting for this question tbf
{
"name": "@repo/db",
"version": "1.0.0",
"main": "database.server.ts",
"types": "database.server.ts",
"sideEffects": false,
"exports": {
".": {
"import": "./database.server.ts"
},
"./schema": {
"import": "./schema/index.ts"
}
},
"dependencies": {
"drizzle-orm": "^0.44.2",
"mysql2": "^3.14.1"
},
"devDependencies": {
"drizzle-kit": "^0.31.2"
},
"scripts": {
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
}
}
{
"name": "@repo/db",
"version": "1.0.0",
"main": "database.server.ts",
"types": "database.server.ts",
"sideEffects": false,
"exports": {
".": {
"import": "./database.server.ts"
},
"./schema": {
"import": "./schema/index.ts"
}
},
"dependencies": {
"drizzle-orm": "^0.44.2",
"mysql2": "^3.14.1"
},
"devDependencies": {
"drizzle-kit": "^0.31.2"
},
"scripts": {
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
}
}
package.json if you need it
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Make sure all packages have the same version of Drizzle Kit And reinstall node_modules
rontheline
rontheline4mo ago
triple checked already, every other package is as peer dependency, and they are all up to date also done that
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Are you using bun?
rontheline
rontheline4mo ago
yes
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Can you check version of drizzle-kit in bun.lock?
rontheline
rontheline4mo ago
"drizzle-kit": ["drizzle-kit@0.31.2", "", { "dependencies": { "@drizzle-team/brocli": "^0.10.2", "@esbuild-kit/esm-loader": "^2.5.5", "esbuild": "^0.25.4", "esbuild-register": "^3.5.0" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-Z2Uqxvu4HNFzlDkG3NQ2BYpII8SlOMkpjsC5XFh9TsYP2nYhfVamVjQ8spiMFXH3vGOyUt1cQ5FZ1JSgl6+8QQ=="],

"drizzle-orm": ["drizzle-orm@0.44.2", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1.13", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/sql.js": "*", "@upstash/redis": ">=1.34.7", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "knex", "kysely", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-zGAqBzWWkVSFjZpwPOrmCrgO++1kZ5H/rZ4qTGeGOe18iXGVJWf3WPfHOVwFIbmi8kHjfJstC6rJomzGx8g/dQ=="],
"drizzle-kit": ["drizzle-kit@0.31.2", "", { "dependencies": { "@drizzle-team/brocli": "^0.10.2", "@esbuild-kit/esm-loader": "^2.5.5", "esbuild": "^0.25.4", "esbuild-register": "^3.5.0" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-Z2Uqxvu4HNFzlDkG3NQ2BYpII8SlOMkpjsC5XFh9TsYP2nYhfVamVjQ8spiMFXH3vGOyUt1cQ5FZ1JSgl6+8QQ=="],

"drizzle-orm": ["drizzle-orm@0.44.2", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1.13", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/sql.js": "*", "@upstash/redis": ">=1.34.7", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "knex", "kysely", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-zGAqBzWWkVSFjZpwPOrmCrgO++1kZ5H/rZ4qTGeGOe18iXGVJWf3WPfHOVwFIbmi8kHjfJstC6rJomzGx8g/dQ=="],
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
What command do you use to launch the studio?
rontheline
rontheline4mo ago
bun drizzle-kit studio
bun drizzle-kit studio
or
bunx drizzle-kit studio
bunx drizzle-kit studio
tried all of them
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Since Bun does not support CompressionStream yet, try using pnpm or npm
rontheline
rontheline4mo ago
okok
rontheline
rontheline4mo ago
https://github.com/oven-sh/bun/issues/1723 also seems like a lot of people had similar issues, trying to use drizzle
GitHub
Add CompressionStream · Issue #1723 · oven-sh/bun
What is the problem this feature would solve? The compress middleware in Hono depends on CompressStream, which isn&#39;t implemented by WebKit. By adding it, it would increase the performance of tr...
rontheline
rontheline4mo ago
yeah, downloaded node again, will be using npx for the current matter until they resolve this weird issue thanks again @⚡Z.E.U.S⚡
rontheline
rontheline4mo ago
@⚡Z.E.U.S⚡ hi there, different problem, sorry for the @mention in advance, there is a message popping up about a primary key should be defined for the table. I was trying to update a role for a user, and seems like it cant be done. Didnt want to open a new thread for this message, so i just sent it in here since it is still open
No description
No description
rontheline
rontheline4mo ago
a bit weird this was, never had this issue, and i've been using studio for about a year now zeus?
Laurenz
Laurenz4mo ago
Somebody added an issue about this https://github.com/drizzle-team/drizzle-orm/issues/4673 I am facing the same problem. I would love to debug this. Since I can't find any part of the error message in the drizzle-orm repo I am wondering if the code for drizzle studio is in another repo and a bug there is causing this?
GitHub
[BUG]: drizzle-kit studio: Unable to update or delete rows on table...
Report hasn&#39;t been filed before. I have verified that the bug I&#39;m about to report hasn&#39;t been filed before. What version of drizzle-orm are you using? 0.40.1 What version of drizzle-kit...
rontheline
rontheline4mo ago
i've seen many people with the same issue, but so far, only @⚡Z.E.U.S⚡ was able to fix it for them, waiting on a response from him, and he will most likely help you too
Sveen
Sveen4mo ago
Any updates?
rontheline
rontheline4mo ago
Not as far as i know
Laurenz
Laurenz4mo ago
Seems to be resolved, without anything to do on my side. It would be great to have some insight about how the studio is working. Is it closed source? If yes, it would still be cool to document somewhere how it works and how to deal with problems. I'm happy to contribute on that part
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
@rontheline @Laurenz @Sveen Primary key issue should be fixed.
rontheline
rontheline4mo ago
again @⚡Z.E.U.S⚡ with the fixes, thank you so much
Aland
Aland4mo ago
I'm facing the same issue, I have properly set primary keys. drizzle-kit: ^0.31.2 drizzle-orm: ^0.44.2 +1 It would be nice to know more about how drizzle studio is working
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
Can you try a hard refresh?
Aland
Aland4mo ago
Same issue, even tried multiple browsers. I'm using SQLite I have even downgraded but still same error.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡4mo ago
SQLite also should be fixed. Try now.
Aland
Aland4mo ago
Yep It's fixed, thank you.

Did you find this page helpful?