I upgraded to Elixir 1.3. When I tried to start my Phoenix app with mix phoenix.server
I got the error:
== Compilation error on file web/views/page_view.ex ==
** (UndefinedFunctionError) function Phoenix.HTML.Engine.init/1 is undefined or private
Attempting to fix it by upgrading libs, I got other errors like:
** (CompileError) lib/poison/parser.ex:11: Poison.SyntaxError.__struct__/1 is undefined, cannot expand struct Poison.SyntaxError
and
== Compilation error on file lib/plug/test.ex ==
** (CompileError) lib/plug/test.ex:53: Plug.Conn.__struct__/1 is undefined, cannot expand struct Plug.Conn
(stdlib) lists.erl:1353: :lists.mapfoldl/3
Any ideas?
What seemed to fix it for me was forcing dependencies to recompile:
mix deps.compile --force
If you get the error when attempting to run tests, try:
MIX_ENV=test mix deps.compile --force
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With