Railpack failed to prepare the build.”
avinashcraneop-create
FREEOP

17 days ago

My hindi-sikho-backend service repeatedly fails during build preparation.

Error:

“Railpack failed to prepare the build.”

Railway diagnosis says:

“Infrastructure Error”

The same commit and configuration previously built successfully.

Multiple redeployments now fail during build preparation with no useful build logs.

Please investigate the builder/build infrastructure and allow this service to build successfully.

Service: hindi-sikho-backend

Root directory: /server

Builder: Railpack

Healthcheck: /health

Awaiting Conductor Response$10 Bounty

5 Replies

Railway
BOT

17 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 17 days ago


17 days ago

could you share the code for this / a way to reproduce this issue?


milo

could you share the code for this / a way to reproduce this issue?

avinashcraneop-create
FREEOP

16 days ago

I've attached the backend source ZIP for reproduction.

Backend path in the repository:

/server

Please reproduce the issue using /server as the root directory.

The deployment fails during Railpack build preparation.


Status changed to Solved avinashcraneop-create • 16 days ago


avinashcraneop-create

I've attached the backend source ZIP for reproduction. Backend path in the repository: /server Please reproduce the issue using /server as the root directory. The deployment fails during Railpack build preparation.

avinashcraneop-create
FREEOP

16 days ago

GitHub repository:

https://github.com/avinashcraneop-create/hindi-sikho

Backend code location:

/server

Files:

/server/server.js

/server/package.json

/server/README.md

How to reproduce:

  1. Deploy the main branch.
  2. Set Root Directory to /server.
  3. Builder: Railpack.
  4. Healthcheck: /health.
  5. Start the deployment.

The deployment fails before the build starts with:

“Railpack failed to prepare the build”

The log only shows:

“scheduling build on Metal builder”

The same repository/config works for the frontend service, but the backend service fails during build preparation.


Status changed to Awaiting Conductor Response Railway • 16 days ago


milo

could you share the code for this / a way to reproduce this issue?

avinashcraneop-create
FREEOP

16 days ago

GitHub repository:

https://github.com/avinashcraneop-create/hindi-sikho

Backend code location:

/server

Files:

/server/server.js

/server/package.json

/server/README.md

How to reproduce:

  1. Deploy the main branch.
  2. Set Root Directory to /server.
  3. Builder: Railpack.
  4. Healthcheck: /health.
  5. Start the deployment.

The deployment fails before the build starts with:

“Railpack failed to prepare the build”

The log only shows:

“scheduling build on Metal builder”

The same repository/config works for the frontend service, but the backend service fails during build preparation.


jkiisu
PRO

16 days ago

Hi,

I reproduced this from your public repo with /server as the root directory. The current /server/package.json is effectively empty (one newline). In a fresh Railway service, both that file and no package.json failed during Railpack preparation, with only the Metal builder scheduling message in the logs.

I then added a valid package.json with "type": "module", "start": "node server.js", and the dependencies imported by server.js (express, cors, bcryptjs, jsonwebtoken, pg, dotenv). The Railpack build completed successfully.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...