mikejm
I installed Ubuntu on Windows for Elixir development as some of the packages I need are not Windows compatible. So I need to test/run my existing Phoenix/Elixir project from inside this Ubuntu command line.
I got Elixir/Erlang/Phoenix installed okay, but when I navigate to an existing directory where I have a project like cd /mnt/h/users/mike/documents/testserver/ and run iex -S mix phx.server I get:
==> file_system
Compiling 7 files (.ex)
** (EXIT from #PID<0.99.0>) an exception was raised:
** (File.Error) could not touch "/mnt/h/users/mike/documents/testserver/_build/dev/lib/file_system/ebin/Elixir.FileSystem.beam": not owner
(elixir 1.16.0) lib/file.ex:631: File.touch!/2
(elixir 1.16.0) lib/kernel/parallel_compiler.ex:334: anonymous fn/3 in Kernel.ParallelCompiler.write_module_binaries/3
(elixir 1.16.0) lib/enum.ex:1264: anonymous fn/3 in Enum.flat_map/2
(stdlib 5.2) maps.erl:416: :maps.fold_1/4
(elixir 1.16.0) lib/enum.ex:2540: Enum.flat_map/2
(elixir 1.16.0) lib/kernel/parallel_compiler.ex:260: Kernel.ParallelCompiler.spawn_workers/3
(mix 1.16.0) lib/mix/compilers/elixir.ex:1002: anonymous fn/9 in Mix.Compilers.Elixir.compiler_loop/6
Do you know what this might represent?
I tried deleting the _build folder and letting it make it again but it just creates a new _build folder with only Elixir.FileSystem.beam and fails after that same error.
Is there some trick to running this setup I’m missing in terms of file access on Ubuntu on Windows?
If I try to access the project like nano mix.exs I can edit the file and save so I do have permissions but the Elixir build is not running.
elixir -v gives Erlang/OTP 26 & Elixir 1.16.0 which seems to be as expected.
Thanks for any help.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #performance











Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
mikejm
Found the missing trick. When you install Ubuntu on Windows it makes you create a new username and password, but when you check
chownall your files are owned byroot(which will not be who you will be auto set up as.You need to follow the instructions here:
Basically, close the Ubuntu down and from an elevated command prompt run
ubuntu config --default-user rootthen restart your Ubuntu and you will be in asrootwith normal ability to do anything after that.Though you will have to reinstall elixir/erlang again.
Leaving this as a solution in case anyone else finds it.