Erlang无法在intellij中运行

Mar*_*aht 2 erlang intellij-idea

尝试在 intellij 中运行简单的 erlang 文件。

-module('Tutorial').

%% API
-export([helloWorld/0]).

helloWorld() -> io:write("Hello World").
Run Code Online (Sandbox Code Playgroud)

但当我尝试跑步时,我总是得到

init terminating in do_boot ()

{"init terminating in do_boot",{{unbound_var,'Tutorial'},[{erl_eval,exprs,2,[]}]}}
Crash dump is being written to: erl_crash.dump...done
Run Code Online (Sandbox Code Playgroud)

我使用 erlang 8.3 和 erlang 的 intellij 插件。

Mat*_*nde 5

使用:

-module('tutorial').
Run Code Online (Sandbox Code Playgroud)

在名为“tutorial.erl”的文件中。表达式:“Tutorial”被解释为变量(因为第一个字母是大写的)。当运行时遇到此变量时,它会尝试评估它,但由于它未定义,因此您会收到错误。