我\xc2\xb4m 按照Phoenix LiveView Starter中的免费截屏/教程进行操作\n但我\xc2\xb4m 甚至无法启动,mix setup失败原因为:
=ERROR REPORT==== 6-Jul-2022::12:47:58.702361 ===\nbeam/beam_load.c(551): Error loading function rebar3:parse_args/1: op put_tuple u x:\n please re-compile this module with an Erlang/OTP 25 compiler\n\n\nescript: exception error: undefined function rebar3:main/1\n in function escript:run/2 (escript.erl, line 750)\n in call from escript:start/1 (escript.erl, line 277)\n in call from init:start_em/1\n in call from init:do_boot/3\n** (Mix) Could not compile dependency :telemetry, "/Users/martinstabenfeldt/.mix/rebar3 bare compile --paths /Users/martinstabenfeldt/Work/pragmaticstudio.com-liveview-starter/code-bundle/live_view_studio/_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"\nRun Code Online (Sandbox Code Playgroud)\n$ elixir --version\nErlang/OTP 25 [erts-13.0.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] [dtrace]\n\nElixir 1.13.4 (compiled with Erlang/OTP 24)\nRun Code Online (Sandbox Code Playgroud)\n我的 mix.exs 部门看起来像这样:
\n defp deps do\n [\n {:phoenix, "~> 1.5.13"},\n {:phoenix_ecto, "~> 4.4"},\n {:ecto_sql, "~> 3.4"},\n {:postgrex, ">= 0.0.0"},\n {:phoenix_live_view, "~> 0.16.4"},\n {:floki, ">= 0.30.0", only: :test},\n {:phoenix_html, "~> 3.0.4"},\n {:phoenix_live_reload, "~> 1.2", only: :dev},\n {:phoenix_live_dashboard, "~> 0.4"},\n {:telemetry_metrics, "~> 0.6"},\n {:telemetry_poller, "~> 1.0"},\n {:gettext, "~> 0.11"},\n {:jason, "~> 1.0"},\n {:plug_cowboy, "~> 2.0"},\n {:faker, "~> 0.17.0"},\n {:number, "~> 1.0"}\n ]\n end\nRun Code Online (Sandbox Code Playgroud)\nI\xc2\xb4m 不确定如何使用 OTP 25 编译器重新编译。\nI\xc2\xb4m 运行 Elixir 1.13.4。\xc2\xb4s 是用 OTP 24 编译的。不确定这是否与此有关?\n我\xc2\xb4ve 也尝试过 mix local-rebar --force,但mix deps.update telemetry没有任何运气。
如果您仔细检查提示elixir --version,您会发现:
Elixir 1.13.4 (compiled with Erlang/OTP 24)\nRun Code Online (Sandbox Code Playgroud)\n假设您用作asdf版本管理器,请确保您安装了正确的elixir版本:
$ asdf list all elixir\n...\n1.13.4\n1.13.4-otp-22\n1.13.4-otp-23\n1.13.4-otp-24\n1.13.4-otp-25\n...\nRun Code Online (Sandbox Code Playgroud)\n你需要一个,用 编译OTP25,意思是
$ asdf install elixir 1.13.4-otp-25\n$ asdf global elixir 1.13.4-otp-25\nRun Code Online (Sandbox Code Playgroud)\n会做。
\n小智 5
用 Erlang/OTP 25 编译的版本替换 Elixir 对我来说并没有完全解决问题。我还必须重新安装钢筋。我猜这就是这条消息首先告诉我的......
\n\xe2\x9e\x9c notifier mix compile\n=ERROR REPORT==== 29-Aug-2022::14:31:31.718410 ===\nbeam/beam_load.c(148): Error loading module rebar3:\n please re-compile this module with an Erlang/OTP 25 compiler\n\n\nescript: exception error: undefined function rebar3:main/1\n in function escript:run/2 (escript.erl, line 750)\n in call from escript:start/1 (escript.erl, line 277)\n in call from init:start_em/1\n in call from init:do_boot/3\n** (Mix) Could not compile dependency :telemetry, "/Users/tblevins/.mix/rebar3 bare compile --paths /Users/tblevins/Projects/Sites/Phoenix/personal/notifier/_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"\n\xe2\x9e\x9c notifier elixir --version\nErlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] [dtrace]\n\nElixir 1.13.4 (compiled with Erlang/OTP 25)\nRun Code Online (Sandbox Code Playgroud)\n我不得不重新安装钢筋mix local.rebar
| 归档时间: |
|
| 查看次数: |
5273 次 |
| 最近记录: |