{"catalogRevision":"cat_f13ab9a494120b5e","recipeId":"page:guides:nestjs:deployment-diagnostics","recipeRevision":"r1","canonicalPath":"/guides/nestjs/deployment-diagnostics","label":"Diagnose deployment failures for NestJS","family":"Framework operation","summary":"Deployment diagnostics for a NestJS app on Ample. Verified on NestJS: the same app deployed with a deliberate boot failure (CANARY_FAIL=boot): `ample deploy` exited 1 with a coded failure (health_check_failed when the process dies at boot, public_ingress_failed when the framework boots but every request answers 500) and the app's own error line was readable with `ample logs <deployment_id> --kind runtime`, so the cause is read from the framework's output rather than guessed. Build and start: npm install, nest build (TypeScript) then node dist/main.js on the node-22 template.","representativeQueries":["Diagnose deployment failures for NestJS","Where can I host Diagnose deployment failures built with NestJS?","I need framework-specific failure signatures and validation checks using only actual available observability interfaces."],"breadcrumbIds":["discovery","stack","stack:frameworks","stack:framework-nestjs","page:guides:nestjs:deployment-diagnostics"],"breadcrumbs":[{"id":"discovery","label":"Agent hosting discovery","canonicalPath":"/discover/discovery","kind":"root"},{"id":"stack","label":"Frameworks and execution targets","canonicalPath":"/discover/stack","kind":"facet"},{"id":"stack:frameworks","label":"Frameworks","canonicalPath":"/discover/stack/frameworks","kind":"group"},{"id":"stack:framework-nestjs","label":"NestJS","canonicalPath":"/discover/stack/framework-nestjs","kind":"atom"},{"id":"page:guides:nestjs:deployment-diagnostics","label":"Diagnose deployment failures for NestJS","canonicalPath":"/guides/nestjs/deployment-diagnostics","kind":"recipe"}],"parentIds":["stack:framework-nestjs","intent:troubleshoot-deployment","pattern:public-web-service"],"parents":[{"id":"stack:framework-nestjs","label":"NestJS","canonicalPath":"/discover/stack/framework-nestjs","kind":"atom"},{"id":"intent:troubleshoot-deployment","label":"Troubleshoot deployment","canonicalPath":"/discover/intent/troubleshoot-deployment","kind":"atom"},{"id":"pattern:public-web-service","label":"Public web service","canonicalPath":"/discover/pattern/public-web-service","kind":"atom"}],"resourceRequirements":["primitive:compute"],"infrastructureRequirements":[{"primitiveId":"primitive:compute","label":"Compute","canonicalPath":"/discover/primitive/compute","status":"verified","summary":"Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes."}],"framework":"NestJS","workload":"Diagnose deployment failures","releaseStatus":"published","supportStatus":"verified","executionStatus":"unbound","docsOnly":true,"prerequisites":["A NestJS project (npm install, nest build (TypeScript) then node dist/main.js on the node-22 template)","An Ample account token with servers:write"],"testedConfiguration":{"template":"node-22","runtime":"node","size":"s-1vcpu-1gb","install":"npm install","build":"npm run build --if-present","start":"npm run start"},"inputSchema":null,"outputSchema":null,"workflowSteps":[{"title":"Read the failure code","body":"Deploy is synchronous. Exit 1 with build_failed means the isolated build failed; health_check_failed means the app built but never answered on PORT (it crashed at boot or bound the wrong port); public_ingress_failed means it answered on PORT but the public URL returned an error status (a request handler or bootstrap failed); exit 2 means a required preflight action is blocking."},{"title":"Read the build log","body":"The last lines name the failing command and its output.","command":"ample logs <deployment_id> --kind build"},{"title":"Read the runtime log","body":"For health_check_failed the runtime log carries the NestJS process output: in the verified run the deliberate boot failure's own error line was there, followed by the platform's health-check verdict and the start command it ran.","command":"ample logs <deployment_id> --kind runtime"},{"title":"Fix and redeploy once","body":"Change the source, the environment or the command override, then run ample deploy again. Do not loop deploys to poll status; an unchanged redeploy is a no-op."},{"title":"Verify","body":"Fetch the live URL on the example; on failure read the build and runtime logs.","command":"ample logs <deployment_id> --kind build"}],"examples":[{"title":"NestJS pattern fixture","description":"Verified deployment diagnostics on NestJS.","sourceRef":"tests/deploy-canaries/nestjs-patterns"}],"successChecks":[{"description":"failed deploy reports health_check_failed synchronously","kind":"manual","expect":"ample deploy exits 1 with error.code health_check_failed"},{"description":"runtime log carries the app's own error line","kind":"manual","expect":"ample logs <deployment_id> --kind runtime shows the framework's error output before the health-check verdict"}],"limitations":["Verified on the node-22 template at s-1vcpu-1gb; other sizes and NestJS major versions are not verified.","Region, compliance attestations and request-duration limits are unknown and not claimed."],"costEstimate":{"currency":"USD","monthlyAmount":5.0,"authoritative":true,"basis":"size prices from pricing.toml (loaded by the API) at build revision 7cf090725a6f16dd91af7d28356fe72c1b404d6e","components":[{"name":"app server","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0}],"note":"Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included."},"evidenceSummary":[{"kind":"canary_run","summary":"NestJS pattern fixture deployed on Ample with CANARY_FAIL=boot (npm install, nest build (TypeScript) then node dist/main.js on the node-22 template); the same app deployed with a deliberate boot failure (CANARY_FAIL=boot): `ample deploy` exited 1 with a coded failure (health_check_failed when the process dies at boot, public_ingress_failed when the framework boots but every request answers 500) and the app's own error line was readable with `ample logs <deployment_id> --kind runtime`, so the cause is read from the framework's output rather than guessed.","observedAt":"2026-09-21T02:23:07Z","implementationRevision":"50dbac567d2c5cc8e55e6c748a646be0025d9cfb (CLI 0.1.21)","expiresAt":"2027-03-20T02:23:07Z","scope":{"checks":[],"template":"node-22"}}],"lastVerifiedAt":"2026-09-21T02:23:07Z","mcpBinding":null,"unknowns":["region availability is unknown until a verified region fact is recorded","compliance attestations are unknown; none are claimed"],"formats":{"html":"https://ample.computer/guides/nestjs/deployment-diagnostics","markdown":"https://ample.computer/guides/nestjs/deployment-diagnostics.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Aguides%3Anestjs%3Adeployment-diagnostics"},"nextActions":[{"actionId":"browse-catalog","label":"Browse the catalog index","operationId":"catalog_index","method":"GET","relativePath":"/v1/catalog","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"search-recipes","label":"Search published recipes by intent, stack and constraints","operationId":"search_recipes","method":"POST","relativePath":"/v1/catalog/search","origin":"api","parameters":{"body":{"limit":5,"query":"Diagnose deployment failures for NestJS"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:guides:nestjs:deployment-diagnostics","label":"Prepare a side-effect-free deployment plan for an authorized project","operationId":"plan_deployment","method":"POST","relativePath":"/v1/catalog/plan","origin":"api","parameters":{"body":{"inputs":{},"projectId":"<workspace or server id you own>","recipeId":"page:guides:nestjs:deployment-diagnostics","recipeRevision":"r1"}},"requiresAuthentication":true,"requiresApproval":false},{"actionId":"auth-setup","label":"Read the existing agent authentication setup","operationId":"existing_auth_setup","method":"GET","relativePath":"/mcp/setup","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:stack:framework-nestjs","label":"Browse NestJS","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/stack%3Aframework-nestjs","origin":"api","parameters":{"nodeId":"stack:framework-nestjs"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:intent:troubleshoot-deployment","label":"Browse Troubleshoot deployment","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/intent%3Atroubleshoot-deployment","origin":"api","parameters":{"nodeId":"intent:troubleshoot-deployment"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:pattern:public-web-service","label":"Browse Public web service","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/pattern%3Apublic-web-service","origin":"api","parameters":{"nodeId":"pattern:public-web-service"},"requiresAuthentication":false,"requiresApproval":false}]}