{"catalogRevision":"cat_f13ab9a494120b5e","recipeId":"page:guides:next-js:deployment-diagnostics","recipeRevision":"r1","canonicalPath":"/guides/next-js/deployment-diagnostics","label":"Diagnose deployment failures for Next.js","family":"Framework operation","summary":"Diagnose a failed Next.js deployment on Ample. Deploy is synchronous: a failed next build returns build_failed with the deployment id, and ample logs exposes the build log and then the runtime log so the cause is read, not guessed.","representativeQueries":["Diagnose deployment failures for Next.js","Where can I host Diagnose deployment failures built with Next.js?","I need framework-specific failure signatures and validation checks using only actual available observability interfaces."],"breadcrumbIds":["discovery","stack","stack:frameworks","stack:framework-next-js","page:guides:next-js: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-next-js","label":"Next.js","canonicalPath":"/discover/stack/framework-next-js","kind":"atom"},{"id":"page:guides:next-js:deployment-diagnostics","label":"Diagnose deployment failures for Next.js","canonicalPath":"/guides/next-js/deployment-diagnostics","kind":"recipe"}],"parentIds":["stack:framework-next-js","intent:troubleshoot-deployment","pattern:public-web-service"],"parents":[{"id":"stack:framework-next-js","label":"Next.js","canonicalPath":"/discover/stack/framework-next-js","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":"Next.js","workload":"Diagnose deployment failures","releaseStatus":"published","supportStatus":"verified","executionStatus":"unbound","docsOnly":true,"prerequisites":["A deployment id from a failed ample deploy","An Ample account token with servers:read"],"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":"Exit 1 with build_failed means next build failed in the isolated builder; exit 2 means a required preflight action is blocking."},{"title":"Read the build log","body":"Type errors, missing modules and memory failures show at the end of the build log.","command":"ample logs <deployment_id> --kind build"},{"title":"Read the runtime log","body":"A live app that does not answer usually failed to bind 0.0.0.0 on PORT; the runtime log shows it.","command":"ample logs <deployment_id> --kind runtime"},{"title":"Fix and redeploy once","body":"Change the source, then run ample deploy again. Do not loop deploys to poll status."}],"examples":[{"title":"Intentional build failure canary","description":"A failing build command is rejected synchronously and its stderr line appears in the build log.","sourceRef":"tests/deploy-canaries/node-package-no-lock (build-and-list-failure)"}],"successChecks":[{"description":"build log contains the failing command output","kind":"manual","expect":"ample logs <deployment_id> --kind build shows the failure line"}],"limitations":["Verified on the node-22 template at s-1vcpu-1gb; other templates and sizes are not verified by this recipe.","Region, compliance attestations and request-duration limits are unknown and not claimed.","Apps auto-pause when idle and wake on the next request; always-on is an operator setting, not a plan feature.","Documentation only; no tool is executed automatically by the catalog.","The failing-build evidence uses a generic Node fixture; Next.js-specific build failures were not separately reproduced."],"costEstimate":null,"evidenceSummary":[{"kind":"canary_run","summary":"An intentionally failing build was rejected synchronously with build_failed and the failure line was readable in the build log.","observedAt":"2026-09-19T23:55:33Z","implementationRevision":"1764076-tls-account-903d345","expiresAt":"2027-03-18T23:55:33Z","scope":{"cliVersion":"0.1.20","platform":"hosted","template":"node-22"}},{"kind":"canary_run","summary":"Next.js 15 SSR app (next build, next start) deployed on node-22; the page and an API route served correctly.","observedAt":"2026-09-19T23:55:33Z","implementationRevision":"1764076-tls-account-903d345","expiresAt":"2027-03-18T23:55:33Z","scope":{"cliVersion":"0.1.20","platform":"hosted","template":"node-22"}}],"lastVerifiedAt":"2026-09-19T23:55:33Z","mcpBinding":null,"unknowns":["pricing for this recipe is unknown","region availability is unknown until a verified region fact is recorded","compliance attestations are unknown; none are claimed"],"formats":{"html":"https://ample.computer/guides/next-js/deployment-diagnostics","markdown":"https://ample.computer/guides/next-js/deployment-diagnostics.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Aguides%3Anext-js%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 Next.js"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:guides:next-js: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:next-js: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-next-js","label":"Browse Next.js","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/stack%3Aframework-next-js","origin":"api","parameters":{"nodeId":"stack:framework-next-js"},"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}]}