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.Solution:Jump to solution
delete the Procfile and the nixpacks.toml file, then add this Dockerfile to your project
50 Replies
Project ID:
0c7fec98-322c-4deb-ac9d-d61c6c0278bf
railway run pip install pycairothis installs
pycairo
locally
With no issues I have been deploying to Railway, but today this error occurredyour last successfully deployment, what nixpacks version was in use?
it does not state the version on nixpacks:
where can i find the version number?
it would be printed in the build logs on the top of the build table
thanks here it is:
Nixpacks v1.17.0
the thing is my successful builds' Nixpacks version is also Nixpacks v1.17.0
then it was something you added to your app
add the missing module to your requirements.txt
ok, m going through the changed i made recently.
sounds good
have tried reverting to a working git commit, which deployed successfully previously, However the Deployment still crashes with the same errors.
nixpacks wasnt changed, so this was something youve changed, why not just try installing the module needed?
have included in my
requirements.text
pycairo
still the error persists
or should I install it in the railway run pip install pycairo
?^
have included in my requirements.text pycairo still the error persistswas .text a typo? can you please share your repo
ok, wait
how do I share the repo.
give me an email or an username pls
to share the repo.
brody192
sent
looking
are we using Ubuntu locally?
locally?
i mean when i run
railway run
again, railway run, runs the command on your computer
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?sounds possible
have downgraded the
xhtml2pdf
to an older version, still the same:try adding a nixpacks.toml file to your project with this in it
ok, have added the file to my root project folder
still the same issue raised, with failed a deployment.
would you happen to know the apt package that would satisfy this requirement?
sudo apt install libcairo2-dev
updated
still the same deployment failed.
exact same error?
yep, somehow a little verbose, but still the same relating to pycairo
send both build and deploy logs please https://bookmarklets.up.railway.app/log-downloader/
youve sent two build logs
it was before the apt get and after
^
pls use the first one sent
please read my message
the deploy logs:
The API didn't return any log lines,
copy and paste the deploy logs then
No deployment logs. All output sent to stdout will be displayed here
updated again
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.okay working on a solution
Solution
delete the Procfile and the nixpacks.toml file, then add this Dockerfile to your project
okay
Deployed thanks,
what went wrong in the ProcFile and in the NixPacks. that lead to that error?
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
thanks, good it was figured out.
that's what I'm here for!