Drizzle & Postgres JS - "postgres is not a function"
I'm using NestJS v10.3.6
package-json:
here's what i found inside the
/dist
directory :
2 Replies
If you're using Next, then I'd try and check your server/client components. Are you declaring them correctly? I usually see this error when trying to use a function that should be in a server component (e.g.
db.query....
inside a client component.Try with
import * as postgres from 'postgres';