the app and its dependencies are over the 256 MB limit
A deploy stopped because the app's code and its installed dependencies together pass 256 MiB.
A deploy sends your app’s code and every package it depends on. Together they may be at most 256 MiB, and a larger app stops before anything is sent.
Issue
luna deploy stops with the total size and the biggest packages, up to eight of them. luna dev shows the same message.
error: the app and its dependencies are <SIZE> MB, over the 256 MB limit. The largest:
<PACKAGE>: <SIZE> MB
<PACKAGE>: <SIZE> MB
Cause
The total counts three things:
- The app’s own TypeScript, JavaScript, JSON and Python files, outside
node_modulesand hidden folders. - Each package in
dependencies, with the packages those need, as installed innode_modules. - Each installed package that holds lunas, whether the app names it or not.
Packages in devDependencies stay behind. Inside a package, .ts, .map and .md files stay behind too. Every other file of a package counts, data files included.
Solution
Start from the packages the message lists, largest first.
- Move packages that only your build or your tests use to
devDependencies. - Replace a large package with a smaller one that does the part you use.
- Keep large data out of the code. Store it as files in a bucket, as Store files shows.
- Deploy again.
Limits lists this and Luna’s other fixed limits.