-2

When I try to run 'iex -S mix phx.server', I get the error:

iex(1)> 2020-07-26T05:13:18.632000Z error Task OrcasiteWeb.Endpoint started from #PID<0.857.0> terminating ** (stop) :eacces erlang.erl:2217: :erlang.open_port({:spawn_executable, 'c:/Program Files/nodejs/npm.cmd'}, [{:cd, "c:/workspace/orcasite/assets"}, :stderr_to_stdout, :use_stdio, :exit_status, :binary, :hide, {:args, ["run", "watch"]}]) (elixir 1.10.3) lib/system.ex:802: System.cmd/3 (phoenix 1.4.0) lib/phoenix/endpoint/watcher.ex:15: Phoenix.Endpoint.Watcher.watch/3 (elixir 1.10.3) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2 (stdlib 3.12) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 Function: &Phoenix.Endpoint.Watcher.watch/3 Args: ["npm", ["run", "watch"], [cd: "c:/workspace/orcasite/assets"]]

This is similar to this github issue as well as this one

I think the issue is the inverted backslashes in the paths since I'm on Windows 10, I was wondering how to install elixir/mix/phoenix so that this isn't an issue?

Adam Millerchip
  • 20,844
  • 5
  • 51
  • 74
user2279952
  • 341
  • 1
  • 4
  • 9

1 Answers1

1

Never mind, I solved the issue by renaming npm.cmd to npm.bat in C:\Program Files\nodejs

user2279952
  • 341
  • 1
  • 4
  • 9