PrismaP
Prisma8mo ago
2 replies
asciant

How do you deploy the new generated client?

I have tried using the new generator, as advised to do so by the CLI.

generator client {
  provider = "prisma-client" // Required
  output   = "./generated"
}


I then mapped the alias to my
tsconfig.json
:

"paths": {
    "~/*": ["./app/*"],
    "@/*": ["./prisma/generated/*"]
},


I am able to import the client and use it in my application:

import { Prisma, type User, type Role } from "@/client";


However, when I try to deploy my application to Fly.io. I endlessly recieve the following when trying to run
pnpm run build
:

[vite]: Rollup failed to resolve import "@/client" from "/myapp/app/models/user.server.ts".


It seems that, no matter what I do, the generated client alias is not able to be used by my application. Is there some secret sauce that I am missing here?
Was this page helpful?