drizzle orm
i can't use postgres with drizzle orm with sapphire/cli
8 Replies
or can someone tell me any other good postgres lib
The issue is clear
Add the type: module in package.json
then whole code breaks
XD
The thing is that drizzle-orm is using imports that can not be compiled to commonjs. Are you using typescript?
If yes, make sure whatever your compiler is, to compile the code to esm instead of cjs
If not, there is a cool package called cjstoesm just input all the files and it should do the job
its tsc
and im using sapphire tsconfig
which already uses esm
.
We always recommended prisma
Never used drizzle tho
Fyi drizzle is much much slower on most operations compared to something like prisma or typeorm, so you should probably stick with those two
And prisma is pretty easy to use