When I run the Erlang or IEX on windows, while not connect to my work vpn
I get this error
PS C:\Users\myusernameredacted> iex.bat
Erlang/OTP 27 [erts-15.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]
=ERROR REPORT==== 29-Sep-2024::22:02:42.488000 ===
file:path_eval(["H:\\","c:/Users/myusernameredacted/AppData/Roaming/erlang"],".erlang"): no such device or address
Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
This same issue seem to ompaces ElixirLS plugin on VS Code on windows, the language server fail to start and raise this error
Mix.install failed with ** (File.Error) could not make directory (with -p) "h:/.mix/archives/hex-2.1.1
Now H: is set as my home drive
PS C:\Users\myusernameredacted> $env:HOMEDRIVE
H:
Erlang and by consequence Elixir and Elixir tools, seem to try to store some configuration files in the HOMEDRIVE, and when it doesn’t find it raise the error
Now also note that the folder "c:/Users/myusernameredacted/AppData/Roaming/erlang"
exist, I dont know why its part of the error, I assumed that if Elarng doesnt find H:
it would try "c:/Users/myusernameredacted/AppData/Roaming/erlang"
, but this doesnt seem to be the case, since the folder exist and I still get the error
This is my work computer, so i cannot reconfigure my HOMEDRIVE
which is set to a network drive only available when I am connected to the work vpn
Also if this help, I used to get a similar issue with git, where it used to look for gitconfig exclusively in the HOMEDRIVE
, but git provide the possibility to set the environment variable GIT_CONFIG_GLOBAL
Now the iex.bat complains, but works or seem to work, ElixirLs plugin, fails and doesnt load, so this is a bigger issue for the vs code plugin
How can I tell Erlang and Elixir to use a different folder if it fails to find my home drive?
Googling suggest, there is no fix, and issue was raised mainly by RabbitMQ users, so I am not very optimistic, but if anyone knows a fix or a workaround please share it
–edit–
I would like to add that temporarily changing my HOMEDRIVE works, I didnt try to permanently change it, since this is not my personal computer
so running this command on powershell before starting vs code or iex from the same shell works
$env:HOMEDRIVE = 'C:\home\'