I am following Theo Browne's t3 stack build which uses nextjs, typescript, tailwind, drizzle, prisma. I am just starting to set up the db. I set up my index.ts in the server folder with the following code
`import { drizzle } from "drizzle-orm/vercel-postgres";
import { sql } from "@vercel/postgres";
import * as schema from "./schema";
// Use this object to send drizzle queries to your DB
export const db = drizzle(sql, { schema });
This issue comes when I try torun drizzle-kit push:pg` in the cli I am getting a TypeError from this file called bin.cjs in the node modules drizzle-kit folder.
From the cli:
`corybaker@corys-mbp-2 first_t3_app % pnpm run db:push
/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:36676
Request2 = class extends GlobalRequest {
^
TypeError: Class extends value undefined is not a constructor or null
at node_modules/.pnpm/@hono+node-server@1.9.0/node_modules/@hono/node-server/dist/index.mjs (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:36676:30)
at init (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:9:56)
at src/serializer/studio.ts (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:60347:5)
at init (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:9:56)
at Object. (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:65992:1)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
ELIFECYCLE Command failed with exit code 1.`
Expected behavior
the database should be created with the schema I added in.
What version of
drizzle-orm
are you using?0.29.5
What version of
drizzle-kit
are you using?0.20.17
Describe the Bug
I am following Theo Browne's t3 stack build which uses nextjs, typescript, tailwind, drizzle, prisma. I am just starting to set up the db. I set up my index.ts in the server folder with the following code
`import { drizzle } from "drizzle-orm/vercel-postgres"; import { sql } from "@vercel/postgres";
import * as schema from "./schema";
// Use this object to send drizzle queries to your DB export const db = drizzle(sql, { schema });
This issue comes when I try to
run drizzle-kit push:pg` in the cli I am getting a TypeError from this file called bin.cjs in the node modules drizzle-kit folder.From the cli:
![Screenshot 2024-05-04 at 2 09 35 PM](https://github.com/drizzle-team/drizzle-orm/assets/97535904/dcd8e6fe-a0f1-49d8-92fc-c48150c03fb7)
`corybaker@corys-mbp-2 first_t3_app % pnpm run db:push
/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:36676 Request2 = class extends GlobalRequest { ^
TypeError: Class extends value undefined is not a constructor or null at node_modules/.pnpm/@hono+node-server@1.9.0/node_modules/@hono/node-server/dist/index.mjs (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:36676:30) at init (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:9:56) at src/serializer/studio.ts (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:60347:5) at init (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:9:56) at Object. (/Users/corybaker/Desktop/Practice_Projects/first_t3_app/node_modules/.pnpm/drizzle-kit@0.20.17/node_modules/drizzle-kit/bin.cjs:65992:1)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
ELIFECYCLE Command failed with exit code 1.`
Expected behavior
the database should be created with the schema I added in.
Environment & setup
mac ios sonoma 14.4.1 node v16.18.1.
{ "name": "first_t3_app", "version": "0.1.0", "private": true, "type": "module", "scripts": { "build": "next build", "db:push": "drizzle-kit push:pg", "db:studio": "drizzle-kit studio", "dev": "next dev --turbo", "lint": "next lint", "start": "next start" }, "dependencies": { "@heroicons/react": "^2.1.3", "@t3-oss/env-nextjs": "^0.10.1", "@vercel/postgres": "^0.8.0", "drizzle-orm": "^0.29.4", "next": "^14.2.1", "postgres": "^3.4.3", "react": "18.2.0", "react-dom": "18.2.0", "zod": "^3.23.3" }, "devDependencies": { "@types/eslint": "^8.56.2", "@types/node": "^20.11.20", "@types/react": "^18.2.57", "@types/react-dom": "^18.2.19", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "drizzle-kit": "^0.20.14", "eslint": "^8.57.0", "eslint-config-next": "^14.1.3", "eslint-plugin-drizzle": "^0.2.3", "pg": "^8.11.3", "postcss": "^8.4.34", "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.4.1", "typescript": "^5.4.2" }, "ct3aMetadata": { "initVersion": "7.32.0" }, "packageManager": "pnpm@8.7.3" }