I am very new to Phoenix/Elixir and I have a few projects on my local machine that have been working without a problem. After trying to do an ecto.load and adding psql to my environment variables I am unable to launch any mix tasks without a warning that Hex has not been detected.
Could not find Hex, which is needed to build dependency :phoenix Shall I install Hex? (if running non-interactively, use "mix local.hex --force")
Selecting yes attempts to install Hex but produces the following error:
Could not find Hex, which is needed to build dependency :phoenix Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] y ** (File.Error) could not make directory (with -p) "p:/.mix/archives/hex-0.18.1": no such device or address (elixir) lib/file.ex:280: File.mkdir_p!/1 (mix) lib/mix/tasks/archive.install.ex:105: Mix.Tasks.Archive.Install.install/3 (mix) lib/mix/local/installer.ex:107: Mix.Local.Installer.local_install/3 (mix) lib/mix/dep/loader.ex:168: Mix.Dep.Loader.with_scm_and_app/4 (mix) lib/mix/dep/loader.ex:121: Mix.Dep.Loader.to_dep/3 (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2 (mix) lib/mix/dep/loader.ex:336: Mix.Dep.Loader.mix_children/1 (mix) lib/mix/dep/loader.ex:18: Mix.Dep.Loader.children/0
I’m not sure why it seems to be trying to install on my P:/ which is a personal share from my organisation. I do have an existing install of Hex at c:/Users/userprofile/Local/.hex which seems to being ignored by the application.
I have reverted the psql environment variable with no change in the result and I am unable to mix phx.server any of my projects at the moment. I’m a bit stuck!