Is Node required for a Phoenix app?

I’ve got Erlang and Elixir installed on a fairly old Rocky Linux box.

When I clone down my phoenix app, and then run mix setup, it seems to run fine, but then stops at the tailwind part.

Do I have to install Node (or bun) so that the tailwind part will “compile?” Properly?

Thank you

Richard

1 Like

I’ve never had to install it on Arch

1 Like

If you’re speaking about how it works on a recent phoenix apps boilerplate code – no you don’t need any external dependencies. The downloaded binaries of esbuild and tailwind work standalone. But hard to say how far your project might have been customized from there.

3 Likes

By “fairly old” do you mean the versions of Elixir/Erlang are also fairly old?

That could be the problem, but it’s hard for us to say without seeing the error. Node is not required, though it used to be several years ago so if you find an old enough tutorial it might be mentioned.

1 Like

unicode_util_compat 0.7.1
websock 0.5.3
websock_adapter 0.5.8
All dependencies are up to date

Bun v1.2.13 (64ed68c9) Linux x64 (baseline)
Linux Kernel v4.18.0 | glibc v2.28
Args:
Features: no_avx2 no_avx
Elapsed: 0ms | User: 0ms | Sys: 0ms
RSS: 0B | Peak:
16:04:33.887 [debug] Downloading tailwind from https://github.com/tailwindlabs/tailwindcss/releases/download/v4.1.7/tailwindcss-linux-x64

Bun v1.2.13 (64ed68c9) Linux x64 (baseline)
Linux Kernel v4.18.0 | glibc v2.28
Args:
Features: no_avx2 no_avx
Elapsed: 0ms | User: 0ms | Sys: 1ms
RSS: 0B | Peak: ============================================================
Bun v1.2.13 (64ed68c9) Linux x64 (baseline)
Linux Kernel v4.18.0 | glibc v2.28
Args:
Features: no_avx2 no_avx
Elapsed: 1ms | User: 0ms | Sys: 0ms
RSS: 0B | Peak: ** (Mix) `mix tailwind boxwallet` exited with 132

This is the last part out the output.
Elixir and Erlang are not that old.
erlang 26.2.5.16 elixir 1.15.8-otp-26

Richard

1 Like

This is a bad instruction error from Bun (used by the Tailwind standalone CLI), likely caused by your CPU not supporting AVX(2) (because it’s old). The Bun baseline builds they use should prevent this, but it seems to be happening to some people on Macs for some reason. No telling why it’s happening to you.

Either way this does not appear to be an Elixir issue. Try downloading the standalone CLI (the link is right there) and executing it manually. It should fail for the same reason, and then you can report that to Tailwind or Bun if you please.

1 Like

That’s brilliant! Thank you for your clarification.

Richard

1 Like