Cannot run a Distillery release

I’m new to Distillery, and I’m following this guide. I added the version “2.1” dependency and ran the following commands:

mix do deps.get, compile
mix distillery.init
mix distillery.release
_build/dev/rel/<my app>/bin/<my app> start

I did not update the default config.
I got this error after the last command:

sed: read error on ~/Projects/<my app>/quickest_route/_build/dev/rel/<my app>/releases/RELEASES: No such file or directory
init terminating in do_boot ({undef,[{Elixir.Distillery.Releases.Config.Provider,init,[[_]],[]},{init,eval_script,2,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
=CRASH REPORT==== 8-Apr-2023::18:54:29.078711 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.79.0>
    registered_name: []
    exception exit: {bad_return,
                        {{elixir,start,[normal,[]]},
                         {'EXIT',
                             {undef,
                                 [{elixir,start,[normal,[]],[]},
                                  {application_master,start_it_old,4,
                                      [{file,"application_master.erl"},
                                       {line,293}]}]}}}}
      in function  application_master:init/4 (application_master.erl, line 142)
    ancestors: [<0.78.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.80.0>,normal}]
    links: [<0.78.0>,<0.44.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 233
    stack_size: 28
    reductions: 174
  neighbours:

=INFO REPORT==== 8-Apr-2023::18:54:29.105627 ===
    application: elixir
    exited: {bad_return,
                {{elixir,start,[normal,[]]},
                 {'EXIT',
                     {undef,
                         [{elixir,start,[normal,[]],[]},
                          {application_master,start_it_old,4,
                              [{file,"application_master.erl"},
                               {line,293}]}]}}}}
    type: permanent

{"init terminating in do_boot",{undef,[{'Elixir.Distillery.Releases.Config.Provider',init,[[]],[]},{init,eval_script,2,[]},{init,do_boot,3,[]}]}}

I got the same sort of error output from running the release in the other ways:

_build/dev/rel/quickest_route/bin/quickest_route foreground
_build/dev/rel/quickest_route/bin/quickest_route console

I tried simply creating a RELEASES file where it said it was missing. That didn’t help.

I have no experience directly but based on the error and some googling, I wonder if you have not set the expected config provider. See Handling Configuration – distillery v2.0.0-rc.6 specifically:

Out of the box, Distillery also includes a provider for Mix.Config, which allows you to use your config.exs files with a release. You have to opt in to this provider, because Mix.Config blends compile-time and runtime configuration options into one file, and many legacy configs make assumptions about the environment the config is evaluated in (namely that a Mix project is available, or that commands like git can be invoked and have meaningful output). You can use it like so:

environment :prod do
  set config_providers: [
    {Mix.Releases.Config.Providers.Elixir, ["${RELEASE_ROOT_DIR}/var/config.exs"]}
  ]
end

The path given here is where Distillery will place the config.exs which is built for the release (it combines config.exs and any of it’s imported files for the environment the release is built in, to a single file).

It seems that this is the same issue as raised in this github issue.