Hi , anyone using nx ( monorepo ) and prisma ( 3.7...
# orm-help
m
Hi , anyone using nx ( monorepo ) and prisma ( 3.7.0 ) ?
n
Hey Michael 👋 our Ambassador @Sabin Adams just published an article about this, maybe you find what you’re looking for in there? 🙂 https://dev.to/sabinthedev/nx-prisma-generator-af3
s
@Michael Reh Feel free to let me know if you have any questions!
m
Will try it out tomorrow …
👍 1
Hi Sabin, just fyi, this work great. Thx a lot
💯 1
By any chance do u have a dockerfile for a build process which includes the prisma build artifacts ? Running into issues : Cannot find module ‘.prisma/prisma-auth-client’
Struggling how to run the nest application and the prisma example in a dockerfile
s
I don't, but I could certainly look into making one!
m
I think I made one working. However the smaller issue I have is that in the package.json prisma uses version 3.7.0. How to make sure that in teh docker container is using the same version w/o hard coding it in the Dockerfile ? Otherwise prisma generate might not generate the right files and copy form the host is a not possible because of OS mismatch
as I have multiple prisma clients in multiple folders I am not using prisma seed in package json. Solved it this way : “prismaseed” { “builder”: “@nrwl/workspace:run-commands”, “options”: { “commands”: [ “npx ts-node -r tsconfig-paths/register ./libs/prisma-clients/prisma-auth/seed/seed.ts” ], “parallel”: false } },
s
That's awesome, thanks for sharing!