Mix Dependency Warning

Viewed 25

I am taking a Udemy Elixir class from 5 years ago by Stephen Grider. I started on Windows, but have transferred to Linux Mint. Apparently, Elixir was already installed (or updated) to latest version 1.9.1. So, when attempting to:

# mix test
==> earmark_parser
warning: the dependency :earmark_parser requires Elixir "~> 1.11" but you are running on v1.9.1

I already fixed one of these dependency version issues in the mix.exs file. Where should I be looking for the mismatched dependency above and do you have suggestions to correct it?

Thank you in advance! :-)

1 Answers

Latest Elixir is 1.14, not 1.9. Be extremely cautious of using any Elixir or Erlang versions that might ship with Linux distros -- problems with them is a recurring topic on StackOverflow because the included versions tend to be out of date. The error you included says pretty much exactly this: you need at least Elixir 1.11 to run the version of the dependency (earmark_parser). It could be that if you dialed your version of earmark_parser back to something older, it would run in Elixir 1.9 fine. mix hex.info <package> and mix deps.tree can help you trace out the dependencies of dependencies if you really get stuck.

I would strongly recommend using asdf to manage your Elixir versions (and anything else you need to version). In the case of taking an online course, I would recommend using the EXACT version of the Elixir that the course specified -- that will help keep your local work compatible with the course. Use the same versions of the dependencies too, if possible (you can set these inside the mix.exs).

Stephen Grider's course is great, by the way: he's not necessarily an Elixir fan-boy, but he's an effective instructor.

Related