Next.js Discord

Discord Forum

I’m still getting a “web socket” error .. Neon/Drizzle/Auth0

Unanswered
Beveren posted this in #help-forum
Open in Discord
BeverenOP
i keep getting the error of

 '@vercel/postgres' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);

This is my structure 

I’m using Neon DB,  DrizzleORM, Auth0


What is causing this??
            ^

7 Replies

Asian black bear
To ensure you get the best possible assistance, could you please change your thread title to be more descriptive? Specific titles attract the attention of users who can help and make it easier for others to find similar solutions in the future.
'@vercel/postgres' can only connect to remote Neon/Vercel
Which part of your app uses @vercel/postgres? Are you using @vercel/postgres and drizzle?
@Julienng > '@vercel/postgres' can only connect to remote Neon/Vercel Which part of your app uses `@vercel/postgres`? Are you using `@vercel/postgres` and drizzle?
BeverenOP
Yes, Vercel for deploying my site, then Neon for my database with drizzle. Im also using Auth0.
You have this error when starting the app locally ?
What configuration is your env?
What is the code to setup drizzle to the database ?
@Julienng You have this error when starting the app locally ?
BeverenOP
Yes, idk where the server is at, it will make tables, but then it just errors at other times .
import type { Config } from "drizzle-kit";
// requires a .env file, doesn't work with the .env.local file
import "dotenv/config";

if (!process.env.DATABASE_URL)
  throw new Error("DATABASE_URL not found in environment");

export default {
  schema: "./src/db/db.ts",
  out: "./drizzle/",
  dialect: "postgresql",
  dbCredentials: {
    url: process.env.DATABASE_URL as string,
  },
  strict: true,
} satisfies Config;