πŸ“Œ Deployment failed with β€œNixpacks was unable to generate a build plan” for monorepo (frontend + backend)

fedebuilder
HOBBYOP

5 months ago

Hey everyone, I’m trying to deploy a Python Flask backend on Railway using a monorepo structured like this:

BetterPDP/
β”œβ”€β”€ backend/
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ src/
β”œβ”€β”€ └── main.py # Contains app = Flask(__name__) β”‚
└── ...
β”œβ”€β”€ frontend/
β”‚ └── ...

I’ve already:

  • Set the root directory to backend under Settings > Source > Add Root Directory

  • Confirmed that requirements.txt is correctly placed and includes Flask and Gunicorn

  • Confirmed main.py is in src/ and defines app = Flask(__name__)

I'm still getting as an answer:

Nixpacks was unable to generate a build plan for this app. The contents of the app directory are: .DS_Store frontend/ backend/

It seems like Nixpacks is not detecting the root properly or failing to resolve the Python app structure.

Thanks in advance!

$10 Bounty

5 Replies

5 months ago

Can you screenshot your root directory setting? It doesn't look like it's taking effect.


samgordon

Can you screenshot your root directory setting? It doesn't look like it's taking effect.

fedebuilder
HOBBYOP

5 months ago

Here it is

Attachments


5 months ago

Can you try changing to Railpack? Located at the bottom of that settings page.


samgordon

Can you try changing to Railpack? Located at the bottom of that settings page.

fedebuilder
HOBBYOP

5 months ago

Fails exactly as with Nixpacks


5 months ago

I have absolutely no idea why this is happening


πŸ“Œ Deployment failed with β€œNixpacks was unable to generate a build plan” for monorepo (frontend + backend) - Railway Help Station