Build problems
Fix failed builds by symptom, from undetected frameworks and stale lockfiles to memory limits, clone errors and builds that never leave the queue.
A failed build never takes your site down. The previous deployment keeps serving, and the deployment page says so ("Your site is still serving 3b7d5e1."). The explanation card at the top of the page names the problem and quotes the error line. For known errors it shows the fix as a button. This page lists common build failures with their causes and fixes.


Reading a failed build
- The card title starts with Build failed: followed by the explanation, for example "Build failed: pnpm-lock.yaml is out of date". When launchroom doesn't recognise the error, the title is "Build failed" and the card shows the first line of the error message.
- The card's copy button copies the failure class with the raw error message. The classes are
plan_error(launchroom could not work out how to build the app),build_error(a build step exited with an error),config_error(a setting or the repository content is wrong),build_timeout(the build didn't finish before its deadline),transient(registry or network trouble, retried once automatically). - The Build step opens at the first error. Jump to line takes you to that line in Steps; Expand all opens every step. Errors and Warnings above the steps show only those lines.
- The service's Settings → Build page shows what launchroom detected: framework, package manager, versions and where each came from, and the install, build and start commands. Detect again re-reads the branch head after you push a fix.
Build failed: launchroom couldn't detect how to build this app
Cause. Railpack, the builder launchroom uses when there is no Dockerfile, found nothing that tells it which language or framework this is. Typical reasons: the app lives in a subfolder (launchroom then names the folder, see below), the repository has no package.json, requirements.txt, go.mod or similar at that folder, or it uses a stack Railpack doesn't support.
Fix. Pick one:
- Set the Root directory under Settings → Source if the app is in a subfolder.
- Set the install, build and start commands yourself under Settings → Build.
- Add a
Dockerfileto the repository. With the builder on automatic, launchroom uses it from the next build. - Use Generate a Dockerfile (the card's button). launchroom drafts one, builds it and starts the app once before offering it. This needs Dockerfile generation turned on for your team. See Generated Dockerfile.
launchroom never switches builders on its own. If you add a Dockerfile later, it takes over from the next build.
Build failed: your app is in a subfolder
Cause. The folder launchroom builds from (the repository root, unless you set a root directory) has nothing it can build, but a folder below it looks like an app: it has a package.json, requirements.txt, composer.json, Dockerfile or similar. Repositories that keep the app in web/, app/ or frontend/ look like this.
Fix. Use Build from web/ and redeploy on the card. launchroom sets that folder as the Root directory and deploys again. You can change it any time under Settings → Source.
Build failed: launchroom couldn't look up the language version
Cause. The build recognised the language (the log says "Detected Python", for example), but looking up which version to install failed, so it stopped before building. The lookup goes to GitHub, so a network problem or GitHub's rate limit on the build server is the usual reason. Nothing is wrong with your repository.
Fix. Deploy again. launchroom retries this kind of failure once on its own. If it keeps happening, add a GITHUB_TOKEN build variable (a token without any scopes is enough) so the lookups aren't rate limited.
Nothing says how to start this app
Cause. The build succeeded, but there is no start script, Procfile or start command.
Fix. Add a start script (Node), a Procfile, or a start command under Settings → Deploy. Generating a Dockerfile also works, since launchroom verifies it by starting the app.
Build failed: the lockfile is out of date
The card names the file: pnpm-lock.yaml, package-lock.json (from npm ci) or yarn.lock.
Cause. Builds install what the lockfile specifies (pnpm install --frozen-lockfile, npm ci, the Yarn equivalent). Someone changed package.json without updating the lockfile, so the install refuses to guess.
Fix. Run the install command locally, commit the lockfile and push:
pnpm install # or: npm install, yarn install
git add pnpm-lock.yaml
git commit -m "Update lockfile"
git pushThe card has a copy button for the command. Make sure the package manager version you use locally matches the one the plan detected (it is shown with its source, for example packageManager in package.json).
Build failed: the build ran out of memory
The log usually shows JavaScript heap out of memory, exit code: 137 or signal: killed.
Cause. The build used more memory than its budget allows. launchroom reserves memory for the dashboard and running apps, then limits build memory and swap. A Next.js or large TypeScript build on a 2 GB machine can need more than that budget.
Fix.
- For Node builds, click Add NODE_OPTIONS on the card. It opens the service's variables with
NODE_OPTIONS=--max-old-space-size=2048filled in, available at build time. Lower the number on small servers. - On a small server without swap, re-run the installer and accept the 2 GB swap file. New builds can then use some swap and run more slowly. Without a terminal, pass
--create-swap. Updates do not create swap automatically. - Add a server with more memory and give it the Build role. Builds then run there and your apps keep their memory. A laptop or desktop at home works well as a build server. See Roles and placement.
The same out-of-memory pattern after the build (the app itself exits with code 137) is a runtime limit instead: raise the memory limit under Settings → Scaling.
This server blocks what builds need
The build log shows buildkitd keeps restarting and BuildKit's last lines name
apparmor_restrict_unprivileged_userns or fork/exec /proc/self/exe: permission denied. On the server page, the
Builds row under What this server can do says Unavailable.
Cause. Ubuntu 23.10 and later restrict user namespaces through AppArmor, and rootless BuildKit needs one. launchroom
allows it with an AppArmor profile for its build container only, and this server doesn't have that profile loaded yet.
This happens on servers installed before the installer offered the profile, or when the question was answered with n.
Fix. Run the installer on the server again (the same command you installed with) and answer y when it asks about
user namespaces. Or load the profile by hand:
printf 'abi <abi/4.0>,\ninclude <tunables/global>\nprofile launchroom-buildkit flags=(unconfined) {\n userns,\n}\n' | sudo tee /etc/apparmor.d/launchroom-buildkit >/dev/null
sudo apparmor_parser -r -W /etc/apparmor.d/launchroom-buildkitlaunchroom switches its build container to the profile within a few minutes, without a restart. Then redeploy. To
check, run docker inspect lr-system-buildkit --format '{{.HostConfig.SecurityOpt}}': it shows
apparmor=launchroom-buildkit.
Turning the restriction off for the whole server (sysctl kernel.apparmor_restrict_unprivileged_userns=0) also works,
but it removes the protection for every program on the server. The profile keeps it for everything except
launchroom's build container.
A native module or PHP extension is missing
- "A native module could not be compiled" (
gyp ERR!in the log): a dependency builds native code and the build image has no compiler. Click Add RAILPACK_BUILD_APT_PACKAGES to addpython3 make g++at build time, or switch to a package with prebuilt binaries. - "The PHP extension … is missing": a Composer package requires an extension that isn't installed. launchroom reads
composer.lockand installs the extensions your dependencies declare (the build log says "Adds PHP extensions your dependencies need: …"), so this mostly happens for an extension a package uses without declaring it. Add it tocomposer.jsonas"ext-<name>": "*", or use the card's button, which setsRAILPACK_PHP_EXTENSIONS. composer installrefuses the PHP version: launchroom also takes the PHP version fromcomposer.lockwhen the locked packages need a newer one thancomposer.jsonallows, and says so in the build log ("Uses PHP 8.4: composer.lock needs it …"). If the log warns that it couldn't raise the version, setrequire.phpincomposer.jsonto the version you need.
Root directory does not exist in the repository
The card says Configuration error and the message names the folder.
Cause. The service's root directory doesn't exist at the commit being built. This happens after moving an app inside a monorepo, renaming a folder or deploying a branch where it doesn't exist yet.
Fix. Update Root directory under Settings → Source (no leading slash, for example apps/web). In a monorepo the root directory points at the app. When the app belongs to a pnpm, npm, Yarn or Bun workspace, launchroom builds from the workspace root with a filtered build (Turborepo and Nx included), so packages in packages/ resolve. An app with its own lockfile builds on its own. A Dockerfile path is resolved inside the root directory.
A variable is missing
The card reads "The variable NEXT_PUBLIC_API_URL is missing" or the log shows import.meta.env.VITE_… is undefined, KeyError: '…' or "environment variable … is not set".
Cause. The app reads the variable while it is built, but the build did not get it. Variables are runtime-only unless launchroom detects otherwise from the name (NEXT_PUBLIC_*, VITE_* and similar browser prefixes are build-time automatically) or you say so.
Fix. Click Add NAME on the card, or open the variable in the service's Settings → Variables, then under Advanced → Available at choose Build only or Build and runtime. Build-time values reach the build as secrets, never as plain build arguments, and changing one rebuilds the service. See Variables.
A secret the app needs is missing
The card says, for example, "Not deployed: RAILS_MASTER_KEY is missing" and shows a field for it.
Cause. The build found that the app can't start without a secret launchroom can't generate for you, such as Rails's RAILS_MASTER_KEY, and the environment doesn't have it. Once a build has said so, the next deployment without it stops before it builds, in a few seconds, so you don't wait for a full build to learn it.
Fix. Paste the value into the field on the card and click Save and deploy. launchroom saves it as a secret variable of the service in this environment and deploys again. When other changes are staged too, it only saves the secret and opens the staged changes, so you apply everything together. For Rails, the value is the content of config/master.key in your repository's working copy (the file is not committed).
From the CLI: launchroom env set RAILS_MASTER_KEY=<value> --secret --apply.
Not enough memory to start the new version
The class is placement_error, during Roll out. The card names the server and lists what uses the most memory there, with Hibernate beside services that get little traffic.
Cause. An update starts the new version next to the running one and switches over once the new one is healthy, so nobody sees a gap. That needs memory for two copies for a moment. On a small server that is already full (a 2 GB VPS with a database and a few apps), there may be room for one copy only. launchroom checks the memory the server really has free, not the limits you set.
Fix.
- When the server has room for one copy, the card says "fra-1 has room for one copy" and offers Apply with a short gap. The running copy stops first and the new one starts in its place, usually a few seconds offline. Nothing is lost: if the new version doesn't come up, the old one starts again.
- Each service has a short-gap setting under Settings → Deploy: Ask (the default, this card), Allow a short gap (take it without asking) or Never.
- Free memory: stop a service you don't need, turn on Hibernation for one that gets little traffic, or lower another service's memory limit.
- Add a server, or move apps to a bigger one. See Add a server.
The version that is running keeps serving the whole time. A service with a volume (a database, uploads) always stops before it starts, so it never needs room for two copies.
BuildKit didn't start
Cause. BuildKit, which builds images on the server, kept restarting or didn't answer in time. launchroom waited and retried once. Low memory or a full disk on the build server are the usual reasons.
Fix. Redeploy. If it fails the same way, read BuildKit's last lines in the build log and check the server's memory and disk on its page.
A module isn't found during the build
Cause. The build imports a package or file that isn't there: a dependency missing from package.json, a path with the wrong case (Linux file names are case-sensitive, macOS usually isn't), or a file that is ignored by git.
Fix. Add the dependency, fix the import's case, or commit the file, then push.
Deploy is disabled because of a broken reference
The staged changes sheet says "Fix the broken references first" and lists entries such as "web: ${{analytics.URL}} refers to a service that doesn't exist in this environment".


Cause. A variable references a service or variable that doesn't exist in this environment, often after renaming a service, removing one, or promoting from an environment that has a service this one lacks.
Fix. Open the service's Settings → Variables, where broken references are flagged. Point the reference at an existing service slug or variable, or add the missing service, then deploy. See Variables.
No online build server can build for linux/arm64
The full message ends with "Add a build server with that architecture, or restrict the service to servers of a platform you can build for (Settings → Scaling)."
Cause. launchroom builds one image per deployment, for the CPU architecture of the servers the service may run on. If your apps run on arm64 machines (a Raspberry Pi, an Ampere server) and your only build server is x86_64, or the other way round, nothing can build for them. launchroom does not emulate other architectures.
Fix. Give a server of the right architecture the Build role, or restrict the service to servers of an architecture you can build for under Settings → Scaling.
The build stays queued
The deployment sits on Build with nothing happening, or the plan preview says "Waiting for a build server".
Cause. No online server with the Build role has a free slot. Each build server runs a limited number of builds at once (one per four CPU cores, at least one), and others wait in the queue. If the server that built this service last went offline, the build is handed to another build server after about 90 seconds.
Fix.
- Check under Servers that a server with the Build role is online. A sleeping laptop counts as offline.
- If every build server is busy, wait, or cancel builds you don't need. A newer push to the same service replaces queued builds of older commits.
- Add a second build server to spread the load.
Builds stop after two hours by default; instance owners can set LAUNCHROOM_BUILD_TIMEOUT in seconds to change it. Builds waiting in the dashboard's queue don't use up that time. The deadline starts when a server picks the build up, so time it then spends waiting for a free build slot on that server counts. A build that hits its deadline fails with Build timed out and the class build_timeout.
The clone fails
The Build step fails before any build output, with a message from the git server.
| Message | Cause | Fix |
|---|---|---|
| "Sign in to … again in Settings → Git" | The GitLab, Gitea or Forgejo sign-in expired or was revoked. The connection shows "Needs you to sign in again". | Sign in again under Settings → Git, then redeploy. |
| "The host key of … changed", "host key mismatch" | The SSH host key of a plain git server differs from the one you confirmed. launchroom never accepts a changed key silently. The connection shows "Host key changed: builds wait for you". | If you changed the server's keys on purpose, click Check host key again under Settings → Git and compare the fingerprint with ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the git server. If you didn't, find out why before confirming. |
| An authentication or permission error over SSH | The deploy key was removed from the repository or isn't allowed to read it. | Add the public deploy key shown under Settings → Git as a read-only deploy key again, then check access again from the connection's card. |
| The commit can't be fetched | GitHub App installation suspended or the repository removed from it, or a force-push removed the commit. | Check the app's repository access on GitHub, then push again or redeploy the branch head. |
See Git providers for how each connection authenticates.
The server ran out of disk during the build
The card title reads "server-2 ran out of disk during the build".
Cause. There was no space left for the build's files and image layers. launchroom then removes old build cache and unused images on that server right away, and the card says how much it freed.
Fix. When space was freed, the build is retried once by itself. Otherwise click Free space on server-2 and deploy again once it is done. If the disk fills up again, the server needs a bigger disk or fewer images, see Servers.
The build couldn't look up a host name
Cause. The build needed to download something, but the server couldn't resolve the name. Builds use the server's own name resolution.
Fix. Check the server's DNS settings (/etc/resolv.conf) and that it reaches the internet, then deploy again. If the name comes from your code or lockfile, check it for a typo.
The build tried to reach your database
Cause. The framework renders a page while it builds (Next.js prerendering, for example), and that page queries the database. Builds run apart from your services, so the database isn't reachable then. The card names the page.
Fix. Render the page when it is requested instead (in Next.js export const dynamic = 'force-dynamic', or await connection()), or skip the query when the database isn't there.
The build printed nothing for 20 minutes
Cause. A build step showed no progress for 20 minutes, so launchroom stopped it. Usually the step waits for input or for a download that never answers.
Fix. Read the last lines of the build log. A command that asks a question needs a flag such as --yes or CI=true.
Registry or network trouble
The class is transient. Pushing the image to launchroom's registry, pulling a base image or downloading a toolchain failed.
Cause. Usually temporary: an upstream registry error, a rate limit or a short network outage. launchroom retries a transient failure once automatically. When it keeps happening, the cause is usually on your side:
- The control-plane server's disk is full. The registry stores images there; check the server's Health section, or run
./launchroom doctoron it. - A build server at home pushes over the private network. If its network status isn't Connected, the push can't reach the registry. See Private network problems.
Fix. Redeploy. If it fails the same way twice, look at the last lines of the Build step and at the server health of both the build server and the control-plane server.
Next steps
Troubleshooting
Where to look first when something goes wrong, how to collect what a bug report needs, and the guides for each kind of problem.
Health check problems
The build passed but the new version never went live. Fix rollouts that wait, wrong ports and hosts, slow starts, crash loops and failing release commands.