Home > front end >  IntelliJ throws "init terminating in do_boot", but same erl command works in Windows comma
IntelliJ throws "init terminating in do_boot", but same erl command works in Windows comma

Time:10-06

Setup: IntelliJ IDEA 2022.2.2, Erlang 25.0

I am trying to run the Erlang code available at IntelliJ Run Configuration

Windows Command Line

werl shell

CodePudding user response:

Check if there is a file called send_recv.beam in either of the directories specified as code path in the -pa arguments. (The undef error means that it can't find the function send_recv:run/0, more often than not because it can't find the compiled module.)

My guess is that this file is actually in the directory where you ran Erlang from the command prompt, but IntelliJ runs Erlang using another working directory. The current working directory is part of the code path by default, which would be why this works from the command prompt but not within IntelliJ.

CodePudding user response:

I configured RunConfiguration to BUILD before RUNNING ("Before launch" section). As result, RunConfiguration was creating an empty folder "../out/production/workspace-IntelliJ-Erlang1" without .beam files, if the folder does not exist. It would delete any existing .beam files if the folder exists. Hence, the RUN was failing eventually.

As a workaround, I removed the BUILD before RUNNING option from RunConfiguration. And, I manually built using BuildProject before RunConfiguration.

TODO: I will check why was not RunConfiguration able to generate the .beam file.

  • Related