omerss2311
Hologram js deps install failing with :eaccess to npm.cmd
Hello, I am trying to run a Hologram project but whenever I run mix phx.server or mix setup I’m getting the following error right after the Hologram: compiler started log:
** (ErlangError) Erlang error: :eacces
erlang.erl:4716: :erlang.open_port({:spawn_executable, ~c"c:/Program Files/nodejs/npm.cmd"}, [{:cd, "c:/[my path]/hologram_example/deps/hologram/assets"}, :use_stdio, :exit_status, :binary, :hide, {:args, ["install"]}])
(elixir 1.16.2) lib/system.ex:1116: System.do_cmd/3
(hologram 0.5.1) lib/hologram/compiler.ex:366: Hologram.Compiler.install_js_deps/2
(hologram 0.5.1) lib/mix/tasks/compile/hologram.ex:48: Mix.Tasks.Compile.Hologram.run/1
(mix 1.16.2) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.16.2) lib/mix/tasks/compile.all.ex:124: Mix.Tasks.Compile.All.run_compiler/2
(mix 1.16.2) lib/mix/tasks/compile.all.ex:104: Mix.Tasks.Compile.All.compile/4
(mix 1.16.2) lib/mix/tasks/compile.all.ex:93: Mix.Tasks.Compile.All.with_logger_app/2
This happens both when creating a project and when cloning one from github. I tried multiple things such as running as admin, changing permissions to the npm.cmd file / its containing folder, and manually running npm install in the assets folder (which worked but didn’t fix the error).
If it matters, I’m using windows 10.
Is there a way to solve this? Thank you ![]()
Marked As Solved
bartblast
My initial intuition about executable path resolution was on the right track - it started working after applying special resolving for Windows.
I’ve also now included Windows on CI and fixed those problematic file paths with question marks. I encountered too many issues with the Windows 10 through UTM setup (even had to get the Windows 10 ARM64 ISO image through Wayback Machine since Microsoft no longer provides it), so I tested this on GitHub Actions using Windows Server 2022 instead.
All unit and integration tests pass on Windows. I couldn’t get feature tests working in CI because Hologram uses Wallaby, which doesn’t currently support Windows. However, Hologram has extensive unit and integration tests for each stage of the compiler, so there’s a good chance it should work this time. ![]()
Could you try using this version in your mix.exs and let me know if it works?
{:hologram, git: "https://github.com/bartblast/hologram.git", branch: "fix-233"}
Also Liked
omerss2311
Thank you ![]()
And I’m running Elixir 1.16.2 and Erlang 26
omerss2311
Yes that works, thank you very much!
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









