R
Railway13mo ago
mattey

Deployment Failed during build process

Project Id: 0c7fec98-322c-4deb-ac9d-d61c6c0278bf With no issues I have been deploying to Railway, but today this error occurred, No package 'cairo' found ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects Why did this error come about, it was not there before, do i need to install pycairo mannally : railway run pip install pycairo to fix this issue, what was the reason this to come about now.
No description
Solution:
delete the Procfile and the nixpacks.toml file, then add this Dockerfile to your project
Jump to solution
50 Replies
Percy
Percy13mo ago
Project ID: 0c7fec98-322c-4deb-ac9d-d61c6c0278bf
Brody
Brody13mo ago
railway run pip install pycairo
this installs pycairo locally
With no issues I have been deploying to Railway, but today this error occurred
your last successfully deployment, what nixpacks version was in use?
mattey
matteyOP13mo ago
it does not state the version on nixpacks:
No description
mattey
matteyOP13mo ago
where can i find the version number?
Brody
Brody13mo ago
it would be printed in the build logs on the top of the build table
mattey
matteyOP13mo ago
thanks here it is: Nixpacks v1.17.0 the thing is my successful builds' Nixpacks version is also Nixpacks v1.17.0
Brody
Brody13mo ago
then it was something you added to your app add the missing module to your requirements.txt
mattey
matteyOP13mo ago
ok, m going through the changed i made recently.
Brody
Brody13mo ago
sounds good
mattey
matteyOP13mo ago
have tried reverting to a working git commit, which deployed successfully previously, However the Deployment still crashes with the same errors.
Brody
Brody13mo ago
nixpacks wasnt changed, so this was something youve changed, why not just try installing the module needed?
mattey
matteyOP13mo ago
have included in my requirements.text pycairo still the error persists or should I install it in the railway run pip install pycairo ?
Brody
Brody13mo ago
^
have included in my requirements.text pycairo still the error persists
was .text a typo? can you please share your repo
mattey
matteyOP13mo ago
ok, wait how do I share the repo. give me an email or an username pls to share the repo.
Brody
Brody13mo ago
brody192
mattey
matteyOP13mo ago
sent
Brody
Brody13mo ago
looking
mattey
matteyOP13mo ago
are we using Ubuntu locally?
Brody
Brody13mo ago
locally?
mattey
matteyOP13mo ago
i mean when i run railway run
Brody
Brody13mo ago
again, railway run, runs the command on your computer
mattey
matteyOP13mo ago
ok, it might be this module: xhtml2pdf since it needs reportlab and report lab needs pycairo #10 15.30 Collecting reportlab[pycairo]>=4.0.4 cud it be?
Brody
Brody13mo ago
sounds possible
mattey
matteyOP13mo ago
have downgraded the xhtml2pdf to an older version, still the same:
No description
Brody
Brody13mo ago
try adding a nixpacks.toml file to your project with this in it
[phases.setup]
aptPkgs = ['...', 'libcairo2-dev', 'pkg-config', 'python3-dev']
[phases.setup]
aptPkgs = ['...', 'libcairo2-dev', 'pkg-config', 'python3-dev']
mattey
matteyOP13mo ago
ok, have added the file to my root project folder still the same issue raised, with failed a deployment.
Brody
Brody13mo ago
would you happen to know the apt package that would satisfy this requirement?
mattey
matteyOP13mo ago
sudo apt install libcairo2-dev
Brody
Brody13mo ago
updated
mattey
matteyOP13mo ago
still the same deployment failed.
Brody
Brody13mo ago
exact same error?
mattey
matteyOP13mo ago
yep, somehow a little verbose, but still the same relating to pycairo
No description
Brody
Brody13mo ago
send both build and deploy logs please https://bookmarklets.up.railway.app/log-downloader/
Brody
Brody13mo ago
youve sent two build logs
mattey
matteyOP13mo ago
it was before the apt get and after
Brody
Brody13mo ago
^
mattey
matteyOP13mo ago
pls use the first one sent
Brody
Brody13mo ago
please read my message
mattey
matteyOP13mo ago
the deploy logs: The API didn't return any log lines,
Brody
Brody13mo ago
copy and paste the deploy logs then
mattey
matteyOP13mo ago
No deployment logs. All output sent to stdout will be displayed here
Brody
Brody13mo ago
updated again
mattey
matteyOP13mo ago
build failed again i used [phases.setup] aptPkgs = ['...', 'libcairo2-dev', 'pkg-config', 'python3-dev'] in the root directory named nixpacks.toml file where my Procfile is stored.
Brody
Brody13mo ago
okay working on a solution
Solution
Brody
Brody13mo ago
delete the Procfile and the nixpacks.toml file, then add this Dockerfile to your project
mattey
matteyOP13mo ago
okay Deployed thanks, what went wrong in the ProcFile and in the NixPacks. that lead to that error?
Brody
Brody13mo ago
nixpacks was installing the stuff we needed, but wasn't updating the library paths, so instead of dealing with that mess, we just move to a Dockerfile based build
mattey
matteyOP13mo ago
thanks, good it was figured out.
Brody
Brody13mo ago
that's what I'm here for!
Want results from more Discord servers?
Add your server