Can't deploy to Heroku because of missing prod.secret.exs file

Hi. I’m trying to release to heroku following this guide.
But when I get to the end and run:

git push heroku master

I get this error:

remote: ** (Code.LoadError) could not load /tmp/build_4b6356b481d5307fbe2532ff8c234c6e/config/prod.secret.exs
remote:     (elixir) lib/code.ex:1193: Code.find_file/2
remote:     (elixir) lib/code.ex:758: Code.eval_file/2
remote:     (mix) lib/mix/config.ex:158: anonymous fn/2 in Mix.Config.__import__!/2
remote:     (elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
remote:     (mix) lib/mix/config.ex:157: Mix.Config.__import__!/2
remote:     (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
remote:     (elixir) lib/code.ex:240: Code.eval_string/3
remote:  !     Push rejected, failed to compile Elixir app.
remote:  !     Push failed
remote: Verifying deploy...

I can see my env variables wer propertyly created in heroku. Not sure why it is asking for the prod.secret.exs file

Remove any reference from it in prod.exs?


Spot on. That fixed it. Thanks

Removing import_config "prod.secret.exs" in config/prod.exs worked for me as well

1 Like