Analyse failed Node.js build
Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json.
Returns an AI analysis of why a build failed and how to fix it, based on the build logs,
the project file list and package.json. Only builds in the failed state can be analysed;
any other state returns 422. When no analysis could be produced both analysis and
solution are null, in which case read Get NodeJS build logs instead.
Each call runs the analysis again, so call it once per failed build and keep the result. Limited to 5 calls per minute per API client (429 above that).
API Token authentication
u123456789Domain name
mydomain.tldBuild UUID
123e4567-e89b-12d3-a456-426614174000Success response
Why the build failed. null when no analysis could be produced.
The build failed because the entry file server.js does not exist in the project root.Suggested fix for the build failure. null when no analysis could be produced.
Set entry_file to the file that starts the server, for example index.js.Unauthenticated response
Validation error response
Error response
GET /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"analysis": "The build failed because the entry file server.js does not exist in the project root.",
"solution": "Set entry_file to the file that starts the server, for example index.js."
}Last updated
Was this helpful?