Sebb
1
I can’t install decimal
from hex.
What’s going on?
defp deps do
[
{:decimal, "~> 2.1"},
]
end
% mix deps.get
** (Mix) No package with name decimal (from: mix.exs) in registry
% hex.search decimal
Package Description Version URL
decimal Arbitrary precision decimal arithmetic. 2.2.0 https://hex.pm/packages/decimal
Very odd. I just tried it, copy pasted from your example code, and It Work on My Machine. Maybe a weird network blip?
Sebb
3
ok, thanks for checking it out. Still not working for me.
For now I blame the russians and try again tomorrow.
Also double check your env vars or project configuration to see if none of them are pointing to a Hex mirror or similar which may not be available.
1 Like
Sebb
5
I checked that, doesn’t look like it.
I’m using a fresh mix new
project.
Also I can see :decimal
with hex.search
.
% env | grep -i hex
%
% mix hex.config
# (everything default)
% mix hex.info
Hex: 2.1.1
Elixir: 1.17.2
OTP: 27.0
Built with: Elixir 1.16.3 and OTP 24.3.4.17
% mix hex.search decimal
Package Description Version URL
decimal Arbitrary precision... 2.2.0 https://hex.pm/packages/decimal
% mix deps.get
** (Mix) No package with name decimal (from: mix.exs) in registry
Maybe nuke your Hex caches? By default Elixir stores it in ~/.mix and potentially ~/.hex. Maybe something got corrupted/invalid.
1 Like
Sebb
7
yes thats it.
% rm ~/.hex/cache.ets
% mix deps.get
Resolving Hex dependencies...
Resolution completed in 0.008s
New:
decimal 2.2.0
1 Like