P
Prisma4mo ago
Moray

Why are client files generated in node_modules and what does that mean for production builds?

In Prisma 1, generated files were kept within source control. This makes sense to me as it meant edits to the schemas and generated files were kept together, and at any given moment I could see locally exactly what code is running on our production servers. In Prisma >=2 though, client files are in node_modules so they are not in our repositories. Obviously this makes our repos much lighter which is great, but presumably every time we make a database change, we need to not only deploy it, but then each production server needs to regenerate its client files? Now if the schema files are in source control and the version of prisma/client is pinned in package.json then the output of the file generate should be the same every time, but the fact that I can't guarantee to my boss exactly what code we have running in production, the commit hash for that code, and the test results for that commit hash makes me very uneasy. So I guess the main question is am I thinking too much about this and I should just need to add a line to our build scripts to get each app server to rebuild the client files every deploy? Or is there something I've missed?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server