Prisma `node_modules` files are very large
See original GitHub issueBug description
Prisma in node_modules is occupying quite a bit of storage on heroku. See:
39M ./node_modules/prisma/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node
39M ./node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node
39M ./node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node
36M ./node_modules/@prisma/sdk/dist/libquery_engine-debian-openssl-1.1.x.so.node
36M ./node_modules/@prisma/sdk/dist/get-generators/libquery_engine-debian-openssl-1.1.x.so.node
36M ./node_modules/@prisma/sdk/dist/get-generators/engines/461d6a05159055555eb7dfb337c9fb271cbd4d7e/libquery_engine-debian-openssl-1.1.x.so.node
36M ./node_modules/@prisma/sdk/dist/get-generators/engines/461d6a05159055555eb7dfb337c9fb271cbd4d7e
36M ./node_modules/@prisma/sdk/dist/get-generators/engines
36M ./node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node
35M ./node_modules/prisma/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x
32M ./node_modules/prisma/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x
32M ./node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x
29M ./node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x
How to reproduce
Prisma 4.0
Expected behavior
No response
Prisma information
Prisma 4.0
Environment & setup
- OS: Heroku Dyno
- Database: PostgreSQL
- Node.js version: 16
Prisma Version
prisma : 4.0.0
@prisma/client : 4.0.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine da41d2bb3406da22087b849f0e911199ba4fbf11 (at node_modules/prisma/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli da41d2bb3406da22087b849f0e911199ba4fbf11 (at node_modules/prisma/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core da41d2bb3406da22087b849f0e911199ba4fbf11 (at node_modules/prisma/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt da41d2bb3406da22087b849f0e911199ba4fbf11 (at node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : da41d2bb3406da22087b849f0e911199ba4fbf11
Studio : 0.465.0
Preview Features : interactiveTransactions
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Should you use Prisma?
Prisma is a new kind of ORM. This page explains when Prisma would be a good fit, and provides alternatives for other scenarios....
Read more >Deploying to AWS Lambda - Prisma
In this guide, you will set up and deploy a serverless Node.js REST API to AWS Lambda using the Serverless Framework. AWS Lambda...
Read more >Prisma CLI Installation (Reference)
The Prisma CLI is typically installed as a development dependency, that's why the --save-dev (npm) and --dev (Yarn) options are used in the...
Read more >Prisma schema (Reference)
The Prisma schema is the main configuration file when using Prisma. It is typically called schema.prisma and contains your database connection and data ......
Read more >Seeding your database - Prisma
With TypeScript, ts-node does transpiling and typechecking by default; ... In the seed.ts file, import Prisma Client, initialize it and create some records....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Today’s release 4.8.0 has significantly (average 50%, on some platforms even more) decreased the size of our engine files:
https://github.com/prisma/prisma/releases/tag/4.8.0
We know we still have duplicated engine files in multiple locations, and that we are including too many of our engine files - but this was the obvious place to start and we are happy how significantly we could improve the situation already. Expect more updates like this in the coming releases from us.
I created and merged a PR about
@prisma/internals
which included unneeded artifacts. This is usually not an issue for Prisma users, as@prisma/client
andprisma
CLI packages bundle dependencies and do not include these artifacts. But this is an issue when you have a direct dependency on@prisma/internals
(previously@prisma/sdk
) in your dependency graph. So either in your package.json or in the package.json of one of your dependencies, for example,prisma-docs-generator
has a direct dependency on it and is affected.@prisma/internals
unpacked package went from 124.4 MB to 395.4 kB as a result of the PR (will be in next4.8.0
release planned for December 20th)