Eisdir error when generating Elixir release using Mnesia

Hello all,

I am trying to generate an Elixir release that uses Mnesia (for Pow).

I am getting the following error which I am not sure what’s about:

$ MIX_ENV=prod mix release 

15:53:23.552 [error] [label: {:erl_prim_loader, :file_error}, report: 'File operation error: eisdir. Target: ./mnesia.app. Function: get_file. ']

In the runtime.exs I have:

# Set a location for Mnesia database
config :mnesia, dir: to_charlist(System.get_env("MNESIA_DIR") || "./mnesia.app")

Note that the release is generated and works (as long as the directory exists), but I am surprised by the above error and would love to learn what’s wrong.

Thanks a lot for any suggestions.