【问题标题】:Elixir Nerves Phoenix Umbrella Project - Running Phoenix error: 'CoreServices/CoreServices.h' file not foundElixir Nerves Phoenix Umbrella 项目 - 运行 Phoenix 错误:找不到“CoreServices/CoreServices.h”文件
【发布时间】:2017-03-05 08:51:37
【问题描述】:

按照此Nerves Tutorial 设置,在尝试运行服务器时,我在教程结束时收到此错误。

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标签)

【问题讨论】:

    标签: phoenix-framework iot elixir phoenix-framework iot nerves-project


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      在phoenix UI 项目中从mix.exs 中删除{:phoenix_live_reload, "~&gt; 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: []
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-12-01
        • 2017-10-21
        • 2020-04-26
        • 2022-01-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多