© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
20 replies
sevenwestonroads

Deploying Next.js w/ Drizzle on Vercel with Turborepo

I have a turborepo with Next.js using
drizzle-orm
drizzle-orm
as a shared package.

A bit of context - I'm using a monorepo with drizzle and share the tables, types and schemas across all my apps by having a shared
packages/database
packages/database
library - that my Next.js app is consuming.

One issue I've had is that in order to get
drizzle-orm
drizzle-orm
working in my monorepo I've had to install it globally ie. in my root level
package.json
package.json
.

My
package.json
package.json
at the root level looks like this at the moment:

{
  "name": ...,
  "private": true,
  "scripts": {
    "build": "turbo run build",
    "dev": "turbo run dev",
  },
  "devDependencies": {
    "@ianvs/prettier-plugin-sort-imports": "^3.7.2",
    "@types/pg": "^8.6.6",
    "drizzle-kit": "^0.17.5",
    "eslint": "^7.32.0",
    "prettier": "^2.8.7",
    "turbo": "latest"
  },
  "dependencies": {
    "drizzle-orm": "^0.25.4",
    "drizzle-zod": "^0.4.1",
    "pg": "^8.10.0",
    "pg-native": "^3.0.1",
    "zod": "^3.21.4"
  },
  "workspaces": [
    "apps/*",
    "packages/*"
  ]
}
{
  "name": ...,
  "private": true,
  "scripts": {
    "build": "turbo run build",
    "dev": "turbo run dev",
  },
  "devDependencies": {
    "@ianvs/prettier-plugin-sort-imports": "^3.7.2",
    "@types/pg": "^8.6.6",
    "drizzle-kit": "^0.17.5",
    "eslint": "^7.32.0",
    "prettier": "^2.8.7",
    "turbo": "latest"
  },
  "dependencies": {
    "drizzle-orm": "^0.25.4",
    "drizzle-zod": "^0.4.1",
    "pg": "^8.10.0",
    "pg-native": "^3.0.1",
    "zod": "^3.21.4"
  },
  "workspaces": [
    "apps/*",
    "packages/*"
  ]
}

Note that all of the packages above are not in either my
packages/database
packages/database
or
apps/next
apps/next
dependencies.
My Next.js app consume my
database
database
library like this in the
apps/next
apps/next
application's
package.json
package.json

"database": "1.0.0"
"database": "1.0.0"
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Error on Vercel with drizzle
Drizzle TeamDTDrizzle Team / help
3y ago
Drizzle in Turborepo
Drizzle TeamDTDrizzle Team / help
10mo ago
(Next)Auth.js Drizzle Schema
Drizzle TeamDTDrizzle Team / help
2y ago
Drizzle with Next 13.4.2 & Vercel Postgres Timeout
Drizzle TeamDTDrizzle Team / help
3y ago