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

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
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
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43657 311
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
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...
3271 127536 1222
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement