Rust project fails to build
During the build I get the error
cargo: command not found
. In my nixpacks.toml file rust is given as the provider. Tried to redeploy but it doesn't seem to be working.27 Replies
Project ID:
17da20a5-39a3-45c4-9dc5-073cd4c32640
17da20a5-39a3-45c4-9dc5-073cd4c32640
Here are the build logs
please share the nixpacks.toml file
what does the providers option in your service settings say? if it doesnt include rust make sure to add it
it shows rust as the provider in the settings
it knows that it needs to use cargo
try deploying into a new service
It had everything cached and instantly failed due to the same error
try deploying into a new different service
Thats what I did, I made an another service from the same repo.
is rust selected in the providers list in the service settings?
Yes it is
can you temporarily remove your nixpacks.toml file?
Removed the file and it deployed successfully
let's see the build table now?
Now it includes the compilers
now use this nixpacks.toml file instead -
Oh, I somehow missed it in the docs that without the
...
it discards the auto-detected packages
Ok, it deployed with ffmpeg
Thanks for the help!hey I missed that too when you sent it
Okay apparently this is not the end of my issues... I can see in the logs that ffmpeg being installed, but I guess the binary is not in the
PATH
? My code can't spawn the ffmpeg process, it says that there is no such file. For testing I tried to run a which ffmpeg
but it doesn't return anything. Tried installing it via aptPkgs
instead of nixPkgs
but the issue still persists.Solution
well that means it's time to move to a Dockerfile
And don't say you don't know how, if you know rust you can figure out a Dockerfile
I'll try to cook up something then, thanks for the idea
Got my Dockerfile up and running and everything seems to work, including the ffmpeg. Thanks once again.
I keep telling everyone, Dockerfile is the way to go, glad it worked for you too!