1
votes

I'm trying to run mix deps.get. When I do, I get the following error:

(Mix) Invalid Elixir version requirement <version> in mix.exs file

This is my mix.exs file:

def project do
    [
      app: :app,
      version: "0.1.0",
      elixir: "1.6.6",
      elixirc_paths: elixirc_paths(Mix.env()),
      compilers: [:phoenix, :gettext] ++ Mix.compilers(),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps()
    ]
  end

which seems standard. I can't find anything on the internet about this. Changing the version doesnt work, neither does excluding the elixir version field altogether.

NOTE: System details:

Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]
Mix 1.6.6 (compiled with OTP 21)
Elixir 1.6.6 (compiled with OTP 21)
1
From the language used I would assume it's your :elixir field, not :version. I tried reproducing (though not with a phoenix app), and it appears to work fine. However, you typically don't see :elixir locked to such a specific version. Usually you'd see something like "~> 1.6". Does it work if you try that or "~> 1.6.6" or something? - Brett Beatty
hmm, even the fuzzy version does not work - dopatraman
Wild guess, but try to name application something different than :app. Maybe that is the problem. - Hauleth
Also tried this, did not work. - dopatraman
This is very strange, I can remove elixir and version and still mix deps.get works. - David Magalhães

1 Answers

0
votes

I see this issue when Elixir is installed form old package by simply running:

sudo apt-get install elixir

Before running that however we need to add new package repository. It is described on Elixir install page, part for Debian.