Closed OldhamMade closed 4 years ago
Also tried a few variations, including OTP 21.3.7 with Elixir 1.9.4 – still no joy.
Have you tried clearing out your build cache? I've never seen that error before. Is this on Heroku or Gigalixir?
@jesseshieh thanks for the response!
It's on Heroku. I forgot to mention before: this is part of a pipeline and is the output from the automated Review app build process. Whenever the PR is updated a new review app is created and seems to get a unique name each time. As I understand it, this should mean that there's no cache to be cleared.
For the sake of completeness, I did the following:
$ heroku plugins:install heroku-repo
$ heroku repo:purge_cache -a $MYAPP
Set always_rebuild=true
, pushed, but got same error in my review app output.
Found the issue:
My Review app environment had a missing environment variable, one which was required by one of the libraries I use as a dependency. Because the environment variable was not set, the dep saw it as nil
, and then failed to compile since it was expecting a string.
Simply setting the environment variable correctly allowed the app to build as expected. It's unfortunate that the error didn't really provide any further details as to where the issue was.
I'm going to close this ticket, but I hope that this helps others in a similar position. Always remember the golden rule of debugging: always, always, triple-check your assumptions!
@OldhamMade That's great! Thanks for reporting back.
Buildpack config:
Heroku console output:
Running
mix deps.get --only prod
locally (macOS) no issues.