Elixir Nerves Phoenix Umbrella Project - Running Phoenix error: 'CoreServices/CoreServices.h' file not found

Elixir Nerves Phoenix Umbrella Project - Running Phoenix error: 'CoreServices/CoreServices.h' file not found

在此 Nerves Tutorial to setup a 之后,我在尝试 运行 服务器时在教程结束时遇到此错误。

cjsMBP15:ui cj$ mix phoenix.server
==> fs (compile)
Compiling c_src/mac/cli.c
In file included from c_src/mac/cli.c:2:
In file included from c_src/mac/cli.h:4:
c_src/mac/common.h:5:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^
1 error generated.
ERROR: compile failed while processing /Users/cj/elixir_projects/nervous_espresso/deps/fs: rebar_abort
** (Mix) Could not compile dependency :fs, "/Users/cj/.mix/rebar compile skip_deps=true deps_dir="/Users/cj/elixir_projects/nervous_espresso/_build/dev/lib"" command failed. You can recompile this depe
ndency with "mix deps.compile fs", update it with "mix deps.update fs" or clean it with "mix deps.clean fs"
cjsMBP15:ui cj$

我已经重新编译、清理、更新了 fs 库,但似乎无法将其添加到 运行。我错过了什么或者我应该尝试什么?

(请注意是因为没有Nerves标签)

您遇到的问题似乎是为 Mac os 编译 :fs 的问题。您可以尝试更新 brew 并确保已安装 xcode。

从 phoenix UI 项目的 mix.exs 中删除 {:phoenix_live_reload, "~> 1.0", only: :dev}, 解决了错误。似乎存在引用 https://elixirforum.com/t/phoenix-basic-setup-error/3189/15

的破坏性兼容性错误

此外,code_reloader需要在dev.exs

中变成false
config :ui, Ui.Endpoint,
  http: [port: 4000],
  debug_errors: true,
  code_reloader: false,
  check_origin: false,
  watchers: []