I’m attempting to deploy a bare-bones elixir app to Heroku. I keep getting the following error: `** (EXIT from #PID<0.74.0>) an exception was raised:
** (ArgumentError) supervisors expect the child to be a module, a {module, arg} tuple or a map with the child specification, got: {DBConnection.ConnectionPool, {Ecto.Repo.Supervisor, :start_child, [{DBConnection.ConnectionPool, :start_link, [{Postgrex.Protocol, [types: Postgrex.DefaultTypes, hostname: "localhost", port: 5432, repo: StarlinkConnector.Repo, telemetry_prefix: [:starlink_connector, :repo], otp_app: :starlink_connector, timeout: 15000, database: "starlink_connector_prod", pool_size: 2, pool: DBConnection.ConnectionPool]}]}, Ecto.Adapters.Postgres, #Reference<0.115686411.3922591746.186642>, %{opts: [timeout: 15000, pool_size: 2, pool: DBConnection.ConnectionPool], sql: Ecto.Adapters.Postgres.Connection, telemetry: {StarlinkConnector.Repo, :debug, [], [:starlink_connector, :repo, :query]}}]}, :permanent, 5000, :worker, [DBConnection.ConnectionPool]}
(elixir) lib/supervisor.ex:609: Supervisor.init_child/1
(elixir) lib/enum.ex:1255: Enum."-map/2-lists^map/1-0-"/2
(elixir) lib/supervisor.ex:581: Supervisor.init/2
(stdlib) supervisor.erl:294: :supervisor.init/1
(stdlib) gen_server.erl:365: :gen_server.init_it/2
(stdlib) gen_server.erl:333: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3`
I’ve added the build packs for both Elixir and Phoenix and specified my elixir version to be 1.7.x in both the mix.exs file and the elixir_buildpack.config. When I run heroku run "mix --version"
though I get the following:
Running mix --version on ⬢ xxxxxxxxxxxx... up, run.8452 (Free)
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
Mix 1.5.0
From googling I feel like Elixir 1.5 won’t actually work for what I’m doing but it seems Heroku is intent on using that for the project?