question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Production deployment exceeds 1G in dependencies

See original GitHub issue

when 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:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sladgcommented, Feb 22, 2022

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.

0reactions
TheRealFlyingCodercommented, Nov 24, 2022

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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found