HashNuke / heroku-buildpack-elixir

Heroku Buildpack for Elixir with nitro boost
MIT License
811 stars 310 forks source link

Heroku fails: the dependency is not available, run "mix deps.get" #174

Closed 3zcurdia closed 4 years ago

3zcurdia commented 4 years ago

I am trying to push a new app to heroku with an umbrella phoenix (1.5.1) project without static assets. And I am getting the following message:

Enumerating objects: 430, done.
Counting objects: 100% (430/430), done.
Delta compression using up to 8 threads
Compressing objects: 100% (391/391), done.
Writing objects: 100% (430/430), 72.83 KiB | 3.03 MiB/s, done.
Total 430 (delta 172), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Elixir app detected
remote: -----> Checking Erlang and Elixir versions
remote:        WARNING: elixir_buildpack.config wasn't found in the app
remote:        Using default config from Elixir buildpack
remote:        Will use the following versions:
remote:        * Stack heroku-18
remote:        * Erlang 20.1
remote:        * Elixir 1.5.0 
remote: -----> Will export the following config vars:
remote: SECRET_KEY_BASE
remote:        * MIX_ENV=prod
remote: -----> Stack changed, will rebuild
remote: -----> Fetching Erlang 20.1
remote: -----> Installing Erlang 20.1 (changed)
remote: 
remote: -----> Fetching Elixir v1.5.0 for OTP 20
remote: -----> Installing Elixir v1.5.0 (changed)
remote: -----> Installing Hex
remote: * creating /app/.mix/archives/hex-0.20.5
remote: -----> Installing rebar
remote: * creating /app/.mix/rebar
remote: * creating /app/.mix/rebar3
remote: -----> Fetching app dependencies with mix
remote: Resolving Hex dependencies...
remote: Dependency resolution completed:
remote: Unchanged:
remote:   certifi 2.5.1
remote:   combine 0.10.0
remote:   cowboy 2.7.0
remote:   cowlib 2.8.0
remote:   floki 0.26.0
remote:   gettext 0.17.4
remote:   hackney 1.15.2
remote:   html_entities 0.5.1
remote:   idna 6.0.0
remote:   jason 1.2.0
remote:   metrics 1.0.1
remote:   mime 1.3.1
remote:   mimerl 1.2.0
remote:   parse_trans 3.3.0
remote:   phoenix 1.5.1
remote:   phoenix_html 2.14.2
remote:   phoenix_live_dashboard 0.2.1
remote:   phoenix_live_view 0.12.1
remote:   phoenix_pubsub 2.0.0
remote:   plug 1.10.0
remote:   plug_cowboy 2.2.1
remote:   plug_crypto 1.1.2
remote:   ranch 1.7.1
remote:   ssl_verify_fun 1.1.5
remote:   telemetry 0.4.1
remote:   telemetry_metrics 0.4.2
remote:   telemetry_poller 0.5.0
remote:   tesla 1.3.3
remote:   timex 3.6.1
remote:   tzdata 1.0.3
remote:   unicode_util_compat 0.4.1
remote: * Getting floki (Hex package)
remote: * Getting jason (Hex package)
remote: * Getting timex (Hex package)
remote: * Getting combine (Hex package)
remote: * Getting gettext (Hex package)
remote: * Getting tzdata (Hex package)
remote: * Getting hackney (Hex package)
remote: * Getting certifi (Hex package)
remote: * Getting idna (Hex package)
remote: * Getting metrics (Hex package)
remote: * Getting mimerl (Hex package)
remote: * Getting ssl_verify_fun (Hex package)
remote: * Getting unicode_util_compat (Hex package)
remote: * Getting parse_trans (Hex package)
remote: * Getting html_entities (Hex package)
remote: * Getting phoenix (Hex package)
remote: * Getting phoenix_html (Hex package)
remote: * Getting phoenix_live_dashboard (Hex package)
remote: * Getting telemetry_metrics (Hex package)
remote: * Getting telemetry_poller (Hex package)
remote: * Getting plug_cowboy (Hex package)
remote: * Getting cowboy (Hex package)
remote: * Getting plug (Hex package)
remote: * Getting telemetry (Hex package)
remote: * Getting mime (Hex package)
remote: * Getting plug_crypto (Hex package)
remote: * Getting cowlib (Hex package)
remote: * Getting ranch (Hex package)
remote: * Getting phoenix_live_view (Hex package)
remote: * Getting phoenix_pubsub (Hex package)
remote: -----> Copying hex from /app/.mix/archives/hex-0.20.5
remote: -----> Compiling
remote: Unchecked dependencies for environment prod:
remote: * tesla (Hex package)
remote:   the dependency is not available, run "mix deps.get"
remote: ** (Mix) Can't continue due to errors on dependencies
remote:  !     Push rejected, failed to compile Elixir app.
remote: 
remote:  !     Push failed

Also, I am noticing that Heroku is not using my elixir_buildpack.config file. Should I move to edge or this is a real issue?

jesseshieh commented 4 years ago

I'm not sure, but your elixir and erlang version there look pretty old. Maybe try setting them to match what you have in development. Odd that it's not using your config file though. Is it checked into git and at the root of your repository? Are you deploying a branch?

3zcurdia commented 4 years ago

I set my buildpack like this heroku buildpacks:add hashnuke/elixir and I am deploying master. I am following the documentation

jesseshieh commented 4 years ago

Is your config file at the root of your repository? Not in one of the umbrella apps.

3zcurdia commented 4 years ago

Is in the root of the repository

jesseshieh commented 4 years ago

Any way you can give me access to the repo to take a look and see what might be wrong? It might be worth trying the github master just to see if that helps.

3zcurdia commented 4 years ago

I just gave you access, It is a small project, I would really appreciate the feedback

jesseshieh commented 4 years ago

I don't see a config file on your master branch. Are you trying to deploy the heroku branch? If so, see https://devcenter.heroku.com/articles/git#deploying-from-a-branch-besides-master

3zcurdia commented 4 years ago

đŸ¤¦ beginners mistake, now it works. I am so very thankful for your time.