Unchecked dependencies for environment prod: error while deploying to Railway

Hello, this is my first time trying to deploy a Phoenix app to Railway (https://railway.com/).

I followed this guide Deploy a Phoenix App | Railway Docs and used the CLI to trigger deploy.

I am seeing the following error:

[10/12] RUN  mix compile

Unchecked dependencies for environment prod:

* heroicons (https://github.com/tailwindlabs/heroicons.git - v2.1.1)
  lock outdated: the lock is outdated compared to the options in your mix.exs. To fetch locked version run "mix deps.get"

** (Mix) Can't continue due to errors on dependencies

✕ [10/12] RUN  mix compile 
process "/bin/bash -ol pipefail -c mix compile" did not complete successfully: exit code: 1

Strangely mix compile works on local. I am looking for guidance on how to deploy this app. I am using SQLite for local development and wanna use Postgres for Prod.

Thank you for your help :smiley:

This thread might be helpful : Docker build started failing - unchecked dependencies for environment prod

1 Like

Hello, thank you for your reply. It was very useful in general but I am still stuck specifically for railway, as they have the docker template and I don’t control that.

Or did I not understand the tagged issue correctly, and I need to do something else on my end ?

Could this be because I am on Phoenix v1.7.21 ? I specifically picked phx_new for this version of phoenix and created this app.

Have you tried NIXPACKS_NO_CACHE=1 in your nixpacks config?

Somehow, someway, I think you need to tell railway to stop using it’s cache of your mix dependencies (maybe killing your mix.lock and regenerating?)