Following this Nerves Tutorial to setup a phoenix-framework, 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 iot is because there is no Nerves tag)
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: []