fdeage

fdeage

`mix`: I keep having a `Version.InvalidRequirementError` wherever I call it, even without a `mix.exs` file

Hi everyone,

I have a Ubuntu server (on 5.15.0-57-generic) running a Phoenix website.

Recently I tried to update hex with mix local.hex, but the update process got interrupted because I didn’t have enough disk space. Since then, every time I type a mix command, I keep having the following error:

** (Version.InvalidRequirementError) invalid requirement: ""
    (elixir 1.14.1) lib/version.ex:441: Version.parse_requirement!/1
    (elixir 1.14.1) lib/version.ex:287: Version.match?/3
    (mix 1.14.1) lib/mix/local.ex:122: Mix.Local.check_elixir_version_in_ebin/1
    (mix 1.14.1) lib/mix/local.ex:41: anonymous fn/2 in Mix.Local.append_archives/0
    (elixir 1.14.1) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
    (mix 1.14.1) lib/mix/local.ex:40: Mix.Local.append_archives/0
    (mix 1.14.1) lib/mix/cli.ex:8: Mix.CLI.main/1

This happens whether there is a mix.exs file in the current directory or not. iex, elixir and elixirc binaries all work fine.

My ~/.mix/archives/hex-2.0.1 was deleted during the failed update. I tried to reinstall or replace the directory with a fresh one, but couldn’t get mix to work. Of course mix local.hex gives the same error as above.

elixir -v gives:

Erlang/OTP 25 [erts-13.1.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]

Elixir 1.14.1 (compiled with Erlang/OTP 25)

How can I get mix to work again?

Marked As Solved

ericmj

ericmj

Elixir Core Team

Do you have other directories or files in ~/.mix/archives/? If so delete them.

Where Next?

Popular in Questions Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
makeitrein
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project. Baby step #1 is extracting the number ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement