lustre-labs / dev-tools

Lustre's CLI and development tooling: zero-config dev server, bundling, and scaffolding.
45 stars 15 forks source link

Question: Run without Erlang? #35

Closed johannesvollmer closed 4 months ago

johannesvollmer commented 4 months ago

Note: originally posted at https://github.com/lustre-labs/lustre/issues/130#issue-2296312502

Hi! Thanks for this library, I just wanted to try it because it looks amazing.

However, when starting out, I ran into a problem:

> gleam run -m lustre/dev start
  Compiling argv
error: Program not found

The program `escript` was not found. Is it installed?
Documentation for installing Erlang can be viewed here:
https://gleam.run/getting-started/installing/

This looks like Erlang is required to run the dev server. Is this assumption true? I have not installed Erlang yet, but I have installed NodeJS. Gleam seems to runs fine up to this point. I don't know if it's an official goal of Gleam, but it would be nice to not require Erlang when running on NodeJS. What do you think?

Would it be a goal of lustre to make the dev server run on pure NodeJS? Would it even be possible?

Update: I have installed Erlang, and manually had to add it to PATH, but now it fails because it seems I also need to install rebar3 just to run the dev-server, not even sure how to do that...?

hayleigh-dot-dev commented 4 months ago

Hi there! It's a very tall order to have the dev tools work for all of Gleam's targets (I would reasonably have to support deno and bun too).

You are right that dev tools requires erlang. We require erlang for a few reasons:

I will make it clearer in the readme that this runs on the erlang target.

johannesvollmer commented 4 months ago

Thanks for clarification, I didn't know how deeply this depends on Erlang. Your reasons are of course completely understandable. I still think it would be nice if this ran purely with Javascript, but I understand that this is much work with diminishing value. Thanks for your answer.

hayleigh-dot-dev commented 4 months ago

I'd recommend anyone that wants to use js tooling (which will be much more mature anyway) to use vite and the vite-gleam plugin.

Hopefully you can appreciate that my ability to offer support on external tooling is limited ^.^