Escript.exe fails with non-zero exit code and do not return any message

Recently we’ve got an interesting post on our forum and looks like it’s Erlang related:

After some investigation we have found something surprising (?) about escript.exe, see below image:

As you can see there is lots of debug information, but at the end there is a Mix.Error with only exact command, but without any output message from escript.exe … My first idea was that mix lacks in debugging external command output, but as José Valim pointed there is :into option passed, so the output message should be correctly printed by the default shell … which is not a case?

Since mix deps.compile fails on escript.exe resulting with non-zero exit status and no output message it become a very hard to debug issue. Any help would be appreciated.

Here is a failing command:

escript.exe "c:/Users/pedro/.mix/elixir/1-17/rebar3" bare compile --paths c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev/lib/*/ebin

I’m seeing this as well. I installed both Erlang and Elixir with the install scripts and so far everything else works. I’ve tried futzing around with environment variables to see if that’s the issue and so far I cannot say that they’re related.

1 Like

In a basic mix app (the only dependency is {:telemetry, "~> 1.0"} when I now run mix deps.compile I see a module load error:

Could not load module D:\a\otp\otp\otp_win64_27.1.2\erts-15.1.2\bin\erlexec.dll.

I don’t know if this is a red herring or not, but I don’t have a D:. I’d be happy to provide more information, I’m just not sure what to provide. Thanks in advance!

1 Like

If I would have such error I would consider it a death flag! :black_flag:

:joy:

I have no idea either as I’m using Linux. :penguin:

1 Like

I don’t have any of these problems on my Linux or Mac. This journey on Windows is much more treacherous.

Looks like there is a workaround:

as well as the fix:

Related topic: