Nixpacks undefined variable 'dotnet-sdk_9'
aux
HOBBYOP

a year ago

There's a similar thread at https://station.railway.com/questions/deploy-failed-undefined-variable-nixp-b9bcc7f8 but no solution was posted when it was marked solved.

The console logs seem to point to an issue with Nixpacks not setting a variable for the dotnet runtime properly. I've tried changing the few settings on Railway that I have access to but it results in the same error.

Solved

5 Replies

a year ago

Can you link to a deploy where this is happening ?


Status changed to Awaiting User Response Railway 12 months ago


aux
HOBBYOP

a year ago

https://railway.com/project/a291fb91-2155-4eb3-a6b6-ad81fd3fb023/service/759f9fdd-271e-45cc-b82a-b20e4160c382?environmentId=d8dcd5c3-4f31-4378-9260-fb4d65784d97

Nixpacks by default tries to build using net6 but my project is net9, so I try setting NIXPACKS_CSHARP_SDK_VERSION to 9 or 9.0 or 9.0.1 and get the error above.


Status changed to Awaiting Railway Response Railway 12 months ago


a year ago

Could you use a nixpacks plan and set the provider/apt package/etc from there ? https://nixpacks.com/docs/configuration/file


Status changed to Awaiting User Response Railway 12 months ago


aux
HOBBYOP

a year ago

Tried including a nixpacks.toml but that also gave the same error. So I gave up and made a dockerfile like I should have originally. It's up and running now thanks.


Status changed to Awaiting Railway Response Railway 12 months ago


a year ago

Sorry for the trouble, nixpacks/nixos can be painful. Railpack should help with this tremendously, but it's still early days.

Happy to hear you're back up and running !


Status changed to Awaiting User Response Railway 12 months ago


Status changed to Solved itsrems 12 months ago


Loading...