P
Prisma2w ago
UMDVAI

dependencies

Why does npm i --omit=dev still put prisma/typescript/etc. in node_modules? Is there a way to exclude these? They are taking up 50Mb+ of space in my deploy. I though only @prisma and .prisma were needed. I have

"devDependencies": {... "prisma": "^5.20.0",...

"devDependencies": {... "prisma": "^5.20.0",...
and
"dependencies": {..."@prisma/client": "^5.20.0",...
"dependencies": {..."@prisma/client": "^5.20.0",...
yet prisma keeps sneaking back into my node_modules.
2 Replies
Nurul
Nurul7d ago
Hey @UMDVAI We have a related discussion here in this GitHub Issue: https://github.com/prisma/prisma/issues/17720 When you install @prisma/client, it also defines prisma as an peer dependency. This means that in the package tree, prisma is seen as a child of @prisma/client due to which it gets installed in node_modules. You can delete prisma folder in node_modules as suggested here
UMDVAI
UMDVAI7d ago
Thanks! Can you help a bit with this answer? The link you sent me to said to do npm prune --production, but that does not delete the prisma folder in node_modules, nor does it remove any of the transitive dependencies of prisma due to the peer dependency.
Want results from more Discord servers?
Add your server