postgres
postgres copied to clipboard
TypeError: client.unsafe is not a function
This very simple demo of using Drizzle with PostgreSQL and Node gives me the error message in the title. Am I doing something wrong in this file? https://github.com/mvolkmann/drizzle-postgres-node/blob/main/src/db.mjs
The file you referenced does not have any reference to unsafe
at all, so I can't tell how are you using it. But I would guess the problem is exactly as the "error message" is saying. "unsafe" is not a function. unsafe is a string template. You don't do unsafe(...)
instead you do unsafe`...`
.
@Louis-Tian You are correct that my code does not attempt to use unsafe
. That is happening somewhere in the library code.