Repository navigation
fix(queen): drop the duplicate npm ci that Nixpacks cannot delete - #744
Merged
Merged
Conversation
The queen has never deployed. Every one of the 13 deployments on this service failed, and the last three failed here: npm error EBUSY: resource busy or locked, rmdir '/app/node_modules/.cache' exit code: 240 Nixpacks mounts a build cache at /app/node_modules/.cache and already runs `npm ci` in its own install phase. Our buildCommand ran `npm ci` a second time, and `npm ci` deletes node_modules wholesale before installing -- it cannot rmdir the mounted cache, so it aborts. Verified locally against this exact tree: `npm ci` installs 73 packages and `npm run build` emits 83 modules / 253 kB, both exit 0. The application was never the problem. Note for whoever changes this next: this file OVERRIDES the service settings set through the API or dashboard. Setting buildCommand on the service instance had no effect while this line said otherwise -- the build kept using the value from here. Королева не деплоилась ни разу: все 13 деплоев упали. Nixpacks монтирует кэш в /app/node_modules/.cache и сам выполняет npm ci; наша команда сборки запускала npm ci повторно, а он сносит node_modules целиком и не может удалить примонтированный каталог. Локально та же версия собирается чисто. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The build now succeeds; the deploy failed at the healthcheck with
"1/1 replicas never became healthy". The container starts and listens:
> vite preview --host 0.0.0.0 --port ${PORT:-8080}
➜ Local: http://localhost:8080/
so the process is alive and the probe still cannot reach it. `vite preview`
is a development preview server: Vite 6 rejects requests whose Host header it
does not recognise, which is exactly what a platform healthcheck sends. Vite's
own documentation says it is not meant to serve production traffic.
Nixpacks had already detected a static build and provisioned Caddy for it:
║ caddy │ pkgs: caddy, cmds: caddy fmt --overwrite /assets/Caddyfile ║
Our startCommand overrode that. Dropping it hands the built `dist` back to
Caddy, which is what the generated plan intended.
Сборка проходит, падал healthcheck. vite preview — это dev-сервер: Vite 6
отклоняет запросы с незнакомым Host, а именно такой шлёт проверка платформы.
Nixpacks уже поднял Caddy для статики, но наш startCommand его перебивал.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The queen has never deployed
All 13 deployments of the
trinityservice (projectoverflowing-renewal, envproduction) failed. Zero successes.The first ten failed on the root
Dockerfile, which runsfind /app/.zig-cachein a fresh runtime stage where/appdoes not exist — and, having noCOPY --from=builder, never ran the builder stage at all.With the service pointed at
apps/queen-weband Nixpacks, the failure moved here:Cause
Nixpacks mounts a build cache at
/app/node_modules/.cacheand already runsnpm ciin its own install phase:Our
buildCommandrannpm cia second time.npm cideletesnode_moduleswholesale before installing, and it cannotrmdirthe mounted cache directory — so it aborts with EBUSY.Fix
buildCommand: "npm ci && npm run build"→"npm run build". One line.Verification
The application was never the problem. Against this exact tree, locally:
npm cinpm run buildOne thing worth knowing
This file overrides service settings made through the API or dashboard. Setting
buildCommandon the service instance had no effect while this line said otherwise — the build kept using the value from here. That cost two deployments to establish.