You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to migrate my NestJS application to use Nestia in my NX Monorepo. Still, I am encountering an issue which looks like it is related to the use of Prisma (I have another app already migrated that runs smoothly but it doesn't depend on my Prisma setup):
SDK Version: 6.1.0-dev.20240910-2
Expected behavior: The app should run.
Actual behavior:
When running the project, an error like this appear:
TypeError: generated_1.PrismaClient is not a constructor
at Object.../libs/core/models/src/prisma/client.ts
at __webpack_require__
...
It seems like PrismaClient is not being properly initialized, and I suspect it might be due to the webpack config but I couldn't put my finger on it even while I followed your guide for it.
It's actually working when I remove the dependency on Prisma from the application.
Also, my Prisma setup is a bit different. I don't let Prisma generate the types Client inside the node_modules but rather keep them inside an NX Lib and export them through barrel files. Maybe this can cause the issue?
If there is any advice you can give me, I would greatly appreciate the guidance.
Thank you for your help!
The text was updated successfully, but these errors were encountered:
Summary
I am currently trying to migrate my NestJS application to use Nestia in my NX Monorepo. Still, I am encountering an issue which looks like it is related to the use of Prisma (I have another app already migrated that runs smoothly but it doesn't depend on my Prisma setup):
When running the project, an error like this appear:
It seems like PrismaClient is not being properly initialized, and I suspect it might be due to the webpack config but I couldn't put my finger on it even while I followed your guide for it.
It's actually working when I remove the dependency on Prisma from the application.
My
webpack.config.js
for this project:My
tsconfig.json
:Also, my Prisma setup is a bit different. I don't let Prisma generate the types Client inside the node_modules but rather keep them inside an NX Lib and export them through barrel files. Maybe this can cause the issue?
If there is any advice you can give me, I would greatly appreciate the guidance.
Thank you for your help!
The text was updated successfully, but these errors were encountered: