简体   繁体   中英

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

Following this Nerves Tutorial to setup a , I get this error at the end of the tutorial when trying to run the server.

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$

I have recompiled, cleaned, updated fs library, but cannot seem to get it to run. What am I missing or what should I be trying?

(Please note is because there is no Nerves tag)

It looks like what you are experiencing is an issue compiling :fs for Mac os. You can try updating your brew and ensuring that you have xcode installed.

Removing {:phoenix_live_reload, "~> 1.0", only: :dev}, from mix.exs in the phoenix UI project solved the error. It looks like there is a breaking compatibility error that is referenced https://elixirforum.com/t/phoenix-basic-setup-error/3189/15

Also, the code_reloader needs to be turned to false in dev.exs

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM