ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Teamโ€ข3y agoโ€ข
5 replies
broly

Connecting to Vercel Postgres

I'm trying to connect to Vercel Postgres like this:
import { drizzle } from "drizzle-orm/vercel-postgres";
import { sql } from "@vercel/postgres";

export const db = drizzle(sql, { logger: true });
import { drizzle } from "drizzle-orm/vercel-postgres";
import { sql } from "@vercel/postgres";

export const db = drizzle(sql, { logger: true });

But I'm getting this error:
n [VercelPostgresError]: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
n [VercelPostgresError]: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.

It seems like there's no credentials passing here and this
sql
sql
thing should read the connection string from
.env
.env
file which you need to pull from Vercel?
Am I doing something wrong or is the Vercel + Drizzle ORM mix not supported in dev environment yet?
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

@vercel/postgres & drizzle update?
Drizzle TeamDTDrizzle Team / help
3y ago
How to setup vercel/postgres locally
Drizzle TeamDTDrizzle Team / help
15mo ago
Vercel Postgres failed to work locally
Drizzle TeamDTDrizzle Team / help
15mo ago
How to use vercel postgres in localhost?
Drizzle TeamDTDrizzle Team / help
2y ago