drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.61k stars 649 forks source link

[BUG]: Issues with running drizzle studio in github codespaces #3595

Open juicylime opened 5 hours ago

juicylime commented 5 hours ago

Report hasn't been filed before.

What version of drizzle-orm are you using?

0.36.3

What version of drizzle-kit are you using?

0.28.1

Other packages

No response

Describe the Bug

When trying to run bunx drizzle-kit studio in github codespaces I get the following error. I tested on my local machine and was able to get studio working.

root@107aeaa83220:/workspaces/topics-backend# bunx drizzle-kit studio
[bun] Warning: async_hooks.createHook is not implemented in Bun. Hooks can still be created but will never be called.
No config path provided, using default 'drizzle.config.ts'
Reading config file '/workspaces/topics-backend/drizzle.config.ts'
Failed to find Response internal state key
Using 'pg' driver for database querying

 Warning  Drizzle Studio is currently in Beta. If you find anything that is not working as expected or should be improved, feel free to create an issue on GitHub: https://github.com/drizzle-team/drizzle-kit-mirror/issues/new or write to us on Discord: https://discord.gg/WcRKz2FFxN

Drizzle Studio is up and running on https://local.drizzle.studio
84299 |         const accepted = ctx.req.header("Accept-Encoding");
84300 |         const encoding = (options == null ? void 0 : options.encoding) ?? ENCODING_TYPES.find((encoding2) => accepted == null ? void 0 : accepted.includes(encoding2));
84301 |         if (!encoding || !ctx.res.body) {
84302 |           return;
84303 |         }
84304 |         const stream = new CompressionStream(encoding);
                                   ^
ReferenceError: Can't find variable: CompressionStream
      at /workspaces/topics-backend/node_modules/drizzle-kit/bin.cjs:84304:28

I followed the steps here https://gist.github.com/KyGuy2002/201c0712e1bcd5c5a3d7d588496710fc:

  1. Runbunx drizzle-kit studio in codespaces
  2. Forward port 4983 and make it public
  3. Access https://local.drizzle.studio/?host=your-codespace-name-4983.app.github.dev&port=443

Runtime env: Bun 1.1.36