I installed Elixir + Erlang on a fresh Windows 10 machine.
When I run mix local.hex I get absolutely no feedback.
Following the rest of the Phoenix install info like grabbing phx_new fails I’m assuming because mix local.hex is failing.
Any ideas as to what’s happening? I’m stumped. Adding a screenshot below to show elixir -v and mix -v along with the no feedback commands I ran.
(As NobbZ pointed out I also ran the wrong command for phoenix… phx_new vs phx.new. But the primary issue of mix local.hex failing is still the root of it all I think)
mix local.hex should print some output and ask you something like “are you sure you want to install URL”. Please try
mix local.hex --force instead.
mix archive.install has a
--force option as well.
Another thing is, the mix task to create a new phoenix project is
phx_new (a dot, not an underscore) so the command you’d need to run is
Ans as you are on windows… Please check your firewall…
I gave the --force flag a try and got the same result. No output at all.
I tried CMD & Powershell, in regular and Admin mode, and I completely disabled the firewall settings for Windows Defender to test that out.
I have even done a total uninstall and reinstall of elixir + erlang now to see if that would solve it. But no change.
After you ran those commands, regardless of their output, did
mix phx.new hello suceed?
It does not.
The task “phx.new” could not be found.
For anyone like me who arrived here googling this problem:
This is apparently a Windows issue with Erlang 22/23 that is fixed in 24. See Jose’s comments here: mix local.hex does nothing in Windows · Issue #9987 · elixir-lang/elixir · GitHub
I couldn’t get the Windows Elixir installer to update from 22. However, I ran “choco install elixir” from Powershell (as admin), which pulled in the latest Erlang.
After that, I could run “mix local.hex” and continue with setting up Phoenix.