R
Railway9mo ago
0xmanny

non root location for requirements.txt breaks nixpacks build

I attempted to build an api using nixpacks with the requirements.txt file outside of the root directory (e.g. src/requirements.txt). When doing this all builds failed with varying build commands. What's the explanation for this behavior? Is there a way successfully build with requirements.txt outside of the root directory? Thanks in advance!
Solution:
I would say you need to restructure your project
Jump to solution
8 Replies
Percy
Percy9mo ago
Project ID: bf95cb17-c0de-4d0a-97ee-acebaffa2e01
0xmanny
0xmannyOP9mo ago
bf95cb17-c0de-4d0a-97ee-acebaffa2e01
Brody
Brody9mo ago
is the rest of your project located in the src directory?
0xmanny
0xmannyOP9mo ago
The entry point to the api is but the railway.json is not I encountered command not found errors for pip, pip3, and python3
Solution
Brody
Brody9mo ago
I would say you need to restructure your project
0xmanny
0xmannyOP9mo ago
I was able to build the project but am curious what the explanation is behind this behavior and if it's possible to work with a different project structure
Adam
Adam9mo ago
requirements.txt being inside of src/ is pretty irregular for python projects. It's expected to be inside the root folder If you'd like any advice on your app's folder structure, I'd be happy to help out. Just send your GH repo or a screenshot of your folder structure in your IDE
0xmanny
0xmannyOP9mo ago
thanks for offering. feel free to close.
Want results from more Discord servers?
Add your server