At7heb
Can't execute esbuild: "Permission denied" on windows 10
I’m using phoenix 1.6.0 rc0. starting phx.server fails, with this message
$ mix phx.server
[info] Application esbuild exited: exited in: Esbuild.start(:normal, [])
** (EXIT) an exception was raised:
** (ErlangError) Erlang error: :eacces
erlang.erl:4412: :erlang.open_port({:spawn_executable, 'c:/Users/at7wa/NoneDrive/dev/elixr/read_sound
s/_build/esbuild'}, [:use_stdio, :exit_status, :binary, :hide, {:args, ["--version"]}])
OK, so the code is trying to get the version of esbuild. Running it from bash shell:
$ pwd; ./esbuild --version
/c/Users/at7wa/NoneDrive/dev/elixr/read_sounds/_build
bash: ./esbuild: Permission denied
That seems compatible with :eacces error… What is esbuild?
$ pwd; ls -l esbuild; file esbuild
/c/Users/at7wa/NoneDrive/dev/elixr/read_sounds/_build
-rwxr-xr-x 1 at7wa 197609 6979072 Sep 10 08:56 esbuild*
esbuild: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
Do I have to configure Windows to run this executable? Do I need to install Rust or Windows development tools?
Erlang version 24, Elixir 1.12.3, phoenix 1.6.0 rc 0
Marked As Solved
At7heb
With hints from 03Juan, I found installation instructions for esbuild at https://esbuild.github.io/getting-started/#download-a-build. I used:
mkdir esbuild_temporary
cd esbuild_temporary
curl -O https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.12.25.tgz
and did the required tar xf esbuild-windows-64-0.12.25.tgz.
That gave me an esbuild.exe that ran. I copied package/esbuild.exe to _builds/esbuild directory (the .exe suffix is not used) in my liveview project. I was finally able to start the server for phoenix.
Although this is a workaround, I’m going to mark this as a solution. (the real solution is to get phoenix 1.6.0 rc1 to install the correct esbuild.)
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









