---
title: the app and its dependencies are over the 256 MB limit
description: A deploy stopped because the app's code and its installed dependencies together pass 256 MiB.
related:
  - /develop/deploy-an-app
  - /platform/limits
  - /cli/deploy
---

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.

```text
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_modules` and hidden folders.
- Each package in `dependencies`, with the packages those need, as installed in `node_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.

1. Move packages that only your build or your tests use to `devDependencies`.
2. Replace a large package with a smaller one that does the part you use.
3. Keep large data out of the code. Store it as files in a bucket, as [Store files](/files-and-code/store-files) shows.
4. Deploy again.

[Limits](/platform/limits) lists this and Luna's other fixed limits.
