shishini

shishini

Elixir on windows HOMEDRIVE issue: file:path_eval(["H:\\","c:/Users/.../AppData/Roaming/erlang"],".erlang"): no such device or address

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\'

Marked As Solved

axelson

axelson

Scenic Core Team

Have you tried setting the MIX_HOME and HEX_HOME environment variables?

Also Liked

axelson

axelson

Scenic Core Team

There’s not any that I’m aware of. I would prioritize putting setting them to a location that:

  • is always available (so not something accessed over the network)
  • With plenty of available storage space
Hermanverschooten

Hermanverschooten

And permanent, not a temporary folder

Where Next?

Popular in Questions Top

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
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
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
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
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
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
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

We're in Beta

About us Mission Statement