Typescript app can't build with prisma

I have a discord bot written in typescript which uses prisma. I can’t get it started by running npx ts-node-dev index.ts. I get an error saying Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
Which doesn’t help, because when I run prisma generate it says it doesn’t recognize prisma.
I have all modules installed, the app runs on my machine without any issues.

Is prisma in your replit.nix file? Something like nodePackages.prisma?

It’s not, and what you provided doesn’t work

I added pkgs.nodePackages.prisma with "postinstall" : "prisma generate" in package.json. Still no luck

try npx prisma generate :person_shrugging:

1 Like