mix phx.new
creates project with following dependencies:
defp deps do
[
{:phoenix, "~> 1.3.3"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
{:mariaex, ">= 0.0.0"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"}
]
end
When I run mix phx.server
, it fails with following error:
** (Mix) Could not start application xyz: Xyz.Application.start(:normal, []) returned an error: shutdown: failed to start child: XyzWeb.Endpoint
** (EXIT) shutdown: failed to start child: Phoenix.Endpoint.Handler
** (EXIT) "plug_cowboy dependency missing"
Other than this I also noticed that phoenix
version used is old. I am not sure why mix is not using latest (or near latest) versions of dependencies. And Even if those are old, that combination is definitely not working for the version of Elixir installed. My elixir -v
output:
aawasthi$ elixir -v
Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]
Elixir 1.8.2 (compiled with Erlang/OTP 21)