I have a LiveView app (generated with the --no-ecto
option) which depends on a local backend app. The backend app depends on Ecto. When I start the LiveView app, Ecto is apparently not starting:
LiveView app mix.exs
:
defp deps do
[
...
{:back_project, path: "../backend_project/"},
]
end
Error upon running mix phx.server
:
[error] #PID<0.686.0> running Phoenix.Endpoint.SyncCodeReloadPlug (connection #PID<0.685.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
** (RuntimeError) could not lookup Ecto repo BackendProject.Repo because it was not started or it does not exist
How do I force Ecto to start when I start the LiveView app?
I tried naming the dependency’s repo in the LiveView app’s application.ex
, but this just gave me a cryptic error upon starting phx server:
erl_child_setup: failed with error 32 on line 281
[notice] Application liveview_app exited: shutdown