Production deployment exceeds 1G in dependencies
See original GitHub issuewhen deploying my keystone app to heroku I get large slug warnings.
$ du -ha --max-depth 3 /app/server | sort -hr |less
1.2G /app/server
1.1G /app/server/node_modules
283M /app/server/node_modules/@prisma
214M /app/server/node_modules/prisma
161M /app/server/node_modules/@prisma/sdk
112M /app/server/node_modules/prisma/node_modules
111M /app/server/node_modules/@prisma/engines
97M /app/server/node_modules/@next
68M /app/server/.keystone/admin
68M /app/server/.keystone
64M /app/server/.keystone/admin/.next
62M /app/server/node_modules/typescript
59M /app/server/node_modules/typescript/lib
50M /app/server/node_modules/.prisma/client
50M /app/server/node_modules/.prisma
48M /app/server/node_modules/@next/swc-linux-x64-gnu
47M /app/server/node_modules/@next/swc-linux-x64-musl
41M /app/server/node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node
41M /app/server/node_modules/prisma/engines
37M /app/server/node_modules/@keystone-6
36M /app/server/node_modules/next
36M /app/server/node_modules/@keystone-6/core
Is it possible to publish the traced output as https://github.com/vercel/next.js/issues/32183 suggests when using keystone?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Manage functions | Cloud Functions for Firebase - Google
Deploy the function, which results in temporarily running both the old and new functions. Explicitly delete the old function from production using the...
Read more >Pushing an App | Cloud Foundry Docs
Your Cloud Foundry deployment supports the type of app you are going to push, or you have the URL of an externally-available buildpack...
Read more >Heroku: Compiled Slug Size is too large - Stack Overflow
So I reckon that you could separate your dependencies for development and production (heroku). Share.
Read more >Node module size: See how I reduced it by 90% | TSH.io
You've ended up with 1GB node module size? We know the struggle is ... It will skip all of the devDependencies and use...
Read more >Production Considerations for Spring on Kubernetes
Dependencies - the Spring Boot and other frameworks' ... variable as part of your Kubernetes deployment yaml (more on this later).
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
https://nextjs.org/blog/next-12-1#self-hosted-nextjs-improvements
Nextjs 12.1 has
standalone
flag which copies only necessary files and dependencies instead of keeping 100% of them. This could probably be utilised for Keystone build as well.After that, the Prisma CLI is meant to be run as a devDependency, which the @keystone apps aren’t doing and hence the 300MB CLI package in the production node_modules. @prisma/client should be the only production dependency.
There could be a reason for it, but if it’s just an oversight that’ll be a huge win 😃