Can't run drizzle studio

Hey I'm using the t4 starter monorepo and am trying to run drizzle studio however its not working. I get this error: Error: Cannot find module '@drizzle-team/studio/server' These are the terminal logs: bun studio $ cd packages/api && bun studio $ drizzle-kit studio node:internal/modules/cjs/loader:1146 throw err; ^ Error: Cannot find module '@drizzle-team/studio/server' Package.json: { "name": "@t4/api", "version": "2.0.0", "main": "src/index.ts", "license": "MIT", "scripts": { "dev": "wrangler dev", "generate": "drizzle-kit generate:sqlite --schema=./src/db/schema.ts --out=./migrations", "migrate": "wrangler d1 migrations apply production", "migrate:local": "wrangler d1 migrations apply production --local", "seed": "wrangler d1 execute production --file=./seed/seed.sql", "seed:local": "wrangler d1 execute production --local --file=./seed/seed.sql", "studio": "drizzle-kit studio", "deploy": "wrangler deploy --minify src/worker.ts", "postinstall": "bun generate", "clean": "rm -rf .turbo node_modules" }, "dependencies": { "@hono/trpc-server": "^0.1.0", "@trpc/server": "^10.43.2", "@tsndr/cloudflare-worker-jwt": "2.2.7", "drizzle-orm": "^0.29.0", "drizzle-valibot": "beta", "hono": "^3.9.2", "miniflare": "3.20231025.1", "superjson": "1.13.3", "valibot": "^0.20.1", "pg": "^8.12.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20231025.0", "drizzle-kit": "^0.24.1", "typescript": "^5.2.2", "wrangler": "3.22.3" } } Tried installing postgres as I saw this solution online but hasn't changed anything.
11 Replies
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡5mo ago
@Charlie Lamb Hey! Have you tried removing node_modules and reinstalling packages?
Charlie Lamb
Charlie LambOP5mo ago
Hey! Yup, didn't work
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡5mo ago
Can you share your drizzle.config.ts?
Charlie Lamb
Charlie LambOP5mo ago
import type { Config } from 'drizzle-kit' export default { schema: './src/db/schema.ts', out: './migrations', driver: 'd1', dbCredentials: { wranglerConfigPath: 'wrangler.toml', dbName: 'production', }, verbose: false, strict: true, } satisfies Config
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡5mo ago
Does your IDE show any errors in this config?
Charlie Lamb
Charlie LambOP5mo ago
Nope all good
Charlie Lamb
Charlie LambOP5mo ago
Like 99% of the code is from https://t4stack.com/
T4 App Stack
T4 App - Universal React Starter Kit
Open Source, Full-Stack Starter Kit for Shipping Universal React Apps.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡5mo ago
Then it's definitely something with node_modules Because in [email protected] completely different config
Charlie Lamb
Charlie LambOP5mo ago
just defined my own drizzle schema and tried debugging why drizzle studio wasn't working, got some errors about drizzle kit being out of date and then drizzle orm
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡5mo ago
Drizzle ORM - Cloudflare D1 HTTP API with Drizzle Kit
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Charlie Lamb
Charlie LambOP5mo ago
Thank you, starter kit im using was last updated 4 months ago so woundn't be suprised if the config was out of date
Want results from more Discord servers?
Add your server