Error with Elixir 1.8
norpan opened this issue · comments
Running this with Elixir 1.8 I get the following error:
== Compilation error in file lib/ueberauth_example_web/views/auth_view.ex ==
** (BadMapError) expected a map, got: {:safe, ""}
(eex) lib/eex/engine.ex:161: EEx.Engine.handle_begin/1
(eex) lib/eex/compiler.ex:54: EEx.Compiler.generate_buffer/4
(phoenix) lib/phoenix/template.ex:378: Phoenix.Template.compile/2
(phoenix) lib/phoenix/template.ex:186: anonymous fn/3 in Phoenix.Template."MACRO-__before_compile__"/2
(elixir) lib/enum.ex:1940: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix) expanding macro: Phoenix.Template.__before_compile__/1
lib/ueberauth_example_web/views/auth_view.ex:1: UeberauthExampleWeb.AuthView (module)
(elixir) lib/kernel/parallel_compiler.ex:208: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
@norpan this example app needs a facelift to be brought up to speed with Ueberauth, Elixir, and Phoenix.
Do you have any interest in helping out? We could definitely use some extra hands 😁
I would love to help, but I haven't really got a good grasp of Phoenix and EEx
@norpan okay! I will try to revisit this soon. In the mean time I have an example application using Ueberauth over in the Elixir School org: https://github.com/elixirschool/admissions
i have the same problem running the example
Compiling 13 files (.ex)
== Compilation error in file lib/ueberauth_example_web/views/page_view.ex ==
** (BadMapError) expected a map, got: {:safe, [{:|, [], ["", "<div class=\"jumbotron\">\n <h2>Überauth + Phoenix Example</h2>\n <p class=\"lead\">\n This is an application to show an example of how to wire up\n <a href=\"https://github.com/ueberauth/ueberauth\">Überauth</a> with\n <a href=\"https://github.com/phoenixframework/phoenix\">Phoenix</a>.\n </p>\n\n"]}]}
(eex) lib/eex/engine.ex:161: EEx.Engine.handle_begin/1
(eex) lib/eex/compiler.ex:54: EEx.Compiler.generate_buffer/4
(phoenix) lib/phoenix/template.ex:378: Phoenix.Template.compile/2
(phoenix) lib/phoenix/template.ex:186: anonymous fn/3 in Phoenix.Template."MACRO-__before_compile__"/2
(elixir) lib/enum.ex:1940: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix) expanding macro: Phoenix.Template.__before_compile__/1
lib/ueberauth_example_web/views/page_view.ex:1: UeberauthExampleWeb.PageView (module)
(elixir) lib/kernel/parallel_compiler.ex:208: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
the string passed at the beginning is part of the file /lib/ueberauth_example_web/templates/page/index.html.eex
erasing this string the problem looks just like yours
Compiling 13 files (.ex)
== Compilation error in file lib/ueberauth_example_web/views/page_view.ex ==
** (BadMapError) expected a map, got: {:safe, ""}
(eex) lib/eex/engine.ex:161: EEx.Engine.handle_begin/1
(eex) lib/eex/compiler.ex:54: EEx.Compiler.generate_buffer/4
(phoenix) lib/phoenix/template.ex:378: Phoenix.Template.compile/2
(phoenix) lib/phoenix/template.ex:186: anonymous fn/3 in Phoenix.Template."MACRO-__before_compile__"/2
(elixir) lib/enum.ex:1940: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix) expanding macro: Phoenix.Template.__before_compile__/1
lib/ueberauth_example_web/views/page_view.ex:1: UeberauthExampleWeb.PageView (module)
(elixir) lib/kernel/parallel_compiler.ex:208: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
i used
elixir -v
Erlang/OTP 21 [erts-10.2.3] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]
Elixir 1.8.1 (compiled with Erlang/OTP 20)
mix phx.new -v
Phoenix v1.3.4
im new in elixir & phoenix, i have no idea what could have been