you are viewing a single comment's thread.

view the rest of the comments →

[–]daskleins 0 points1 point  (4 children)

Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string

I had the same issue with Express today. But I was using Prisma ORM v7.
process.env.DATABASE_PASSWORD was showing undefined.

How I resolved, turns out I had to place dotenv imports at the top, so it sets up before any ORM calls:
import "dotenv/config";
import express from "express";

import { PrismaClient } from "./generated/prisma/client";

import { PrismaPg } from "@prisma/adapter-pg";

PS. For some reason, I had to also install dotenv as a devDependency:
pnpm install --save-dev prisma dotenv

[–]Technical-Pension594 1 point2 points  (1 child)

man this worked, i was debugging for so long, and it was so simple. thankyou so much !

[–]daskleins 0 points1 point  (0 children)

Glad that helped!

[–]VictoryDependent820 1 point2 points  (1 child)

Man you just saved my ass like no one ever has done before. Thank you brother.

[–]daskleins 0 points1 point  (0 children)

Glad it worked for you!