0
votes

Kindly help with this iisue. I do have system installed Elixir which is version 1.3 and I using asdf.

Here is mix.exs file https://pastebin.com/wd9jPGdq

 [ElixirLS]
an exception was raised:
    ** (Mix.ElixirVersionError) You're trying to run :cards on Elixir v1.3.3 but it has declared in its mix.exs file it supports only Elixir ~> 1.6
        (mix) lib/mix/tasks/loadpaths.ex:51: Mix.Tasks.Loadpaths.check_elixir_version/2
        (mix) lib/mix/tasks/loadpaths.ex:26: Mix.Tasks.Loadpaths.run/1
        (mix) lib/mix/task.ex:296: Mix.Task.run_task/3
        (mix) lib/mix/tasks/compile.ex:83: Mix.Tasks.Compile.run/1
        (mix) lib/mix/task.ex:296: Mix.Task.run_task/3
        (language_server) lib/language_server/build.ex:162: ElixirLS.LanguageServer.Build.compile/0
        (language_server) lib/language_server/build.ex:22: anonymous fn/2 in ElixirLS.LanguageServer.Build.build/3
        (stdlib) timer.erl:166: :timer.tc/1
1
Can you upgrade your installed Elixir version? - Yawar
You currently have Elixir 1.3 active. Your :cards projects states that it only supports Elixir version 1.6 as a minumum. You can check this in the projects mix.exs file. - Justin Wood

1 Answers

0
votes

You can either downgrade the elixir requirement in your mix file and try compiling it again. In your mix.exs file, change:

...
version: "0.1.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
...

To

...
version: "0.1.0",
elixir: "~> 1.3",
start_permanent: Mix.env() == :prod,
...

Then run the following in your terminal:

mix do clean, deps.clean --all
mix deps.get
mix compile

OR, you can upgrade the elixir version installed in your machine.

Follow this link to learn how to install/upgrade elixir. Instructions for installing and upgrading elixir using asdf are here and here.