#undefined function gleam@io:println/1

1 messages · Page 1 of 1 (latest)

odd seal
#

Hi! This is probably a long shot, since the use case is quite specific, but I'm going to try 🙂

I'm making a gleam run configuration for IntelliJ and I'm having trouble. When executing a CommandLine through the IDE, gleam doesn't find the function println/1 as shown here (cwd is the gleam project in question):

/home/simon/Downloads/gleam-v1.4.1-x86_64-unknown-linux-musl/gleam run /home/simon/dev/gleam/example/src/example.gleam
   Compiled in 0.01s
    Running example.main
exception error: undefined function gleam@io:println/1
Process finished with exit code 127

When I do gleam run either in the cli or a bash script, everything is fine, but somehow through the IDE it doesn't work.
Initally I thought the problem was because it was ran through asdf, but I tried directly with the binary and it didn't work either.

Once again, probably a long shot, if someone has an idea I'm all ears!

#

Nvm, looks like it's because of PATH

harsh thorn
odd seal
#

When the erlang SDK is not on the PATH but gleam is, it seems like this is the behavior. I'm not too familiar with how the gleam compiler interacts with erlang though:

$ PATH='/home/simon/.asdf/installs/erlang/27.0.1/bin:[... standard path components]' ~/Downloads/gleam-v1.4.1-x86_64-unknown-linux-musl/gleam run
   Compiled in 0.01s
    Running example.main
Hello, Joe!
$ PATH='[... standard path components]' ~/Downloads/gleam-v1.4.1-x86_64-unknown-linux-musl/gleam run
   Compiled in 0.01s
    Running example.main
exception error: undefined function gleam@io:println/1%
#

I'm not familiar with the details of how Gleam interacts with Erlang, I'm planning on looking into that in the next few days. Still I do have a question; could there be a better error message for it?

rain jetty
#

multiple / conflicting erlang installs on the path?