At7heb

At7heb

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

Showing Posts 1 to 8

03juan

03juan

It’s the alternative to webpack for new Phoenix projects that doesn’t require npm and simplifies the asset pipeline.

What are the permissions of the _build/ directory? It may not have execute permissions somehow.

This

$ ls -la .
total 7.7M
drwxr-xr-x  3 juan juan 4.0K Aug 24 09:10 ./
drwxr-xr-x 10 juan juan 4.0K Aug 24 09:13 ../
drwxr-xr-x  3 juan juan 4.0K Aug 24 09:08 dev/
-rwxr-xr-x  1 juan juan 7.6M Aug 24 09:10 esbuild*

vs this

$ ls -la .
total 7.7M
drw-r--r--  3 juan juan    4096 Aug 24 09:10 .
drwxr-xr-x 10 juan juan    4096 Aug 24 09:13 ..
drwxr-xr-x  3 juan juan    4096 Aug 24 09:08 dev
-rwxr-xr-x  1 juan juan 7962624 Aug 24 09:10 esbuild
At7heb

At7heb OP

Permissions are similar.

$ ls -al .
total 6820
drwxr-xr-x 1 at7wa 197609       0 Sep 10 10:22 ./
drwxr-xr-x 1 at7wa 197609       0 Sep 10 08:36 ../
drwxr-xr-x 1 at7wa 197609       0 Sep 10 07:32 dev/
-rwxr-xr-x 1 at7wa 197609 6979072 Sep 10 08:56 esbuild*

Notable is that the file size of your esbuild is not the same as mine. What is the output from “file esbuild” on your system?

03juan

03juan

Oh I’m running in Ubuntu under wsl2 whereas I assume you’re running straight on Windows? The size difference will be how Rust compiles for either system.

$ file esbuild
esbuild: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=S5u5fTvaa2BJ32w9_CF8/QXKvNJ9FO27y42ntpVKG/DIt0p3ospEslSEvXWXmg/ltMk8agLtVC3qNEunUmb, stripped
At7heb

At7heb OP

Yes, I’m running straight Windows 10, using the git bash shell.

03juan

03juan

Unfortunately I don’t have experience with that strategy so can’t help further. I was hoping my suggestion would be a quick win!

Could be related to this known git-for-windows issue? Errors when running "Git Bash" until it's run as administrator · Issue #1449 · git-for-windows/git · GitHub

At7heb

At7heb OP

thank you for the suggestions.

I’m not so familiar with installing erlang and elixir in wsl2, as well as my preferred IDE–visual studio code. Is there a good guide to getting started?

03juan

03juan

I used asdf from within the Ubuntu wsl distro, as detailed in the Installing Elixir - The Elixir programming language (elixir-lang.org) docs.

I also use VSCode, and that has very good integration with WSL2. Once in the Ubuntu terminal you run code . in your application’s root directory and it will open VSCode in Windows connected to the subsystem.

Not much more to it, although if you want to run :observer from IEx there’s some X-forwarding setup you have to do to have the linux GUI displayed in WIndows.

How are you currently running postgres/DB of choice? Mine is setup through Docker for Windows and that also interfaces well with docker-compose in Ubuntu.

At7heb

At7heb OP

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.)

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
yarrichar
I’m very new to Elixir, so sorry if this is a silly question: I am wondering what happens to the mailbox of a process when the machine i...
New
pragdave
How do I tell Hologram not to escape HTML when substituting into templates? {Textile.render(@product.long_description)} escapes the HTM...
New
Fl4m3Ph03n1x
Background When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error: * assembling mark...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
rlipscombe
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews