Could not compile dependency :iso8601 when trying to run live books. Any ideas?

Hi, could someone share any pointers here? I’m stuck with this error when trying to run livebooks.

$MIX_ENV=prod mix phx.server
===> Analyzing applications...
===> Compiling iso8601
===> Compiling src/iso8601.erl failed
src/iso8601.erl:38:16: syntax error before: '::'
src/iso8601.erl:367:18: syntax error before: 'maybe'

** (Mix) Could not compile dependency :iso8601, "/home/marco/.asdf/installs/elixir/1.16.3/.mix/elixir/1-16/rebar3 bare compile --paths /home/marco/projetos/livebook/_build/prod/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile iso8601 --force", update it with "mix deps.update iso8601" or clean it with "mix deps.clean iso8601"

I’m running:

$asdf list erlang 
 *27.0
$asdf list elixir
 *1.16.3

The command mix deps.get --only prod runs successfully.

From my research, I’ve tried already:

  • running mix local.rebar
  • reinstalling Erlang and Elixir
  • following the instructions in the error message with the commands to recompile, and update (cleaning obviously is not the solution)
  • removing the .mix/rebar3 folder
  • here someone mentions duplicates on PATH var could be an issue, also tried unsuccesfuly

Do you have any ideas where to go next? Much appreciated

Regards

Officially 1.16 isn’t supporting OTP 27, though for reasons likely unrelated to your problem.

1 Like

iso8601 declares a type named maybe, but that’s become a reserved word:

5 Likes

Yes, this is it.
I’ve stumbled upon this also.

2 Likes

Ah, nice.

Thank you very much you all.

Using previous version of Erlang/OTP works.

For what its worth I just built latest Erlang (27), Elixir (17rc1), Livebook (0.13.0-dev) and as well as using patched iso8601 I also had to use latest Katana_code.
(I used local copies with override: true in the livebook mix.exs)

Good news is it appears to work, although there are some warnings about typing violations in katana-code error handling.

1 Like