Trying to build an API using Phoenix v1.3 following this tutorial:
https://dreamconception.com/tech/phoenix-full-fledged-api-in-five-minutes
(made sure to follow each step to the letter)
When I attempt to run mix ecto.setup
I get the following error:
Compiling 17 files (.ex)
== Compilation error on file lib/myapp/users/users.ex ==
** (CompileError) lib/myapp/users/users.ex:65: Myapp.Users.User.__struct__/0 is undefined, cannot expand struct Myapp.Users.User
(stdlib) lists.erl:1354: :lists.mapfoldl/3
lib/myapp/users/users.ex:65: (module)
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
The lib/myapp/users/users.ex
is quite big: https://github.com/nelsonic/phoenix-api-example/blob/master/lib/myapp/users/users.ex#L65
Complete code on GitHub: https://github.com/nelsonic/phoenix-api-example
Any help debugging it would be much appreciated.
MyApp.Users.User
. – Justin Woodweb/
be inlib/
in Phoenix 1.3? I can seedefmodule Myapp.Users.User
inweb/models/coherence/user.ex
. – DogbertCoherence
is assuming it's a V1.2 app... – nelsonic