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