Cannot run Erlang module (error,non_existing)

Try to run module with simple echo server from here

Erlang/OTP 23 [erts-11.1.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
Eshell V11.1.4 (abort with ^G)
1> c(ex4_1).

Beam file not was created

Try run in online compiler
helloworld.erl:5: syntax error before: ‘)’
helloworld.erl:2: function start/0 undefined

How solve this problem?

The first error is Erlang not finding the file ex4_1.erl. Verify that the file is in the right place and named correctly.

The online tool seems to have particular issue with spawn - even this program gives the same kind of syntax error:

% hello world program

start() ->
    spawn(fun() -> ok end).


$erlc *.erl
helloworld.erl:6: syntax error before: ')'
helloworld.erl:3: function start/0 undefined

I couldn’t find any documentation on that site, but I could imagine an online REPL disabling spawn to keep users from consuming all the server resources :thinking:

Thank you. Problem solved, but I don’t know why - its magically worked now. Maybe because i reinstalll erlang or reboot system.