I am having a trouble deploying my master branch to Heroku. When I deploy I get the following error:
remote: == Compilation error in file lib/personal_inventory_web/views/layout_view.ex ==
remote: ** (CompileError) lib/personal_inventory_web/templates/layout/_navigation.html.eex: invalid quoted expression: %{dynamic: [{:=, [], [{:arg0, [], Phoenix.HTML.Engine}, {:case, [generated: true], [{:link, [line: 27], ["Sign in with Google", [to: {{:., [line: 27], [{:__aliases__, [counter: 0, line: 27], [:Routes]}, :auth_path]}, [line: 27], [{{:., [line: 27], [{:__aliases__, [line: 27, alias: false], [:Phoenix, :HTML, :Engine]}, :fetch_assign!]}, [line: 27], [{:var!, [line: 27, context: Phoenix.HTML.Engine, import: Kernel], [{:assigns, [line: 27], Phoenix.HTML.Engine}]}, :conn]}, :request, "google", [scope: "email profile"]]}, class: "button"]]}, [do: [{:->, [generated: true], [[safe: {:data, [generated: true], Phoenix.HTML.Engine}], {:data, [generated: true], Phoenix.HTML.Engine}]}, {:->, [generated: true], [[{:when, [generated: true], [{:bin, [generated: true], Phoenix.HTML.Engine}, {:is_binary, [generated: true, context: Phoenix.HTML.Engine, import: Kernel], [{:bin, [generated: true], Phoenix.HTML.Engine}]}]}], {{:., [generated: true], [{:__aliases__, [generated: true, alias: false], [:Plug, :HTML]}, :html_escape_to_iodata]}, [generated: true], [{:bin, [generated: true], Phoenix.HTML.Engine}]}]}, {:->, [generated: true], [[{:other, [generated: true], Phoenix.HTML.Engine}], {{:., [line: 27], [{:__aliases__, [line: 27, alias: false], [:Phoenix, :HTML, :Safe]}, :to_iodata]}, [line: 27], [{:other, [line: 27], Phoenix.HTML.Engine}]}]}]]]}]}], iodata: [" </li>\n", {:arg0, [], Phoenix.HTML.Engine}, " <li class=\"nav-item\">\n"], vars_count: 1}
I was able to narrow it down to the following block of code, which I verified by removing it and witnessing successful deploy.
<ul class="navbar-nav mr-auto">
<%= if @conn.assigns[:user] do %>
<li class="nav-item">
Logged in as <%= @conn.assigns.user.first_name %>
</li>
<li class="nav-item">
<%= link "Sign out", to: Routes.auth_path(@conn, :delete), class: "button alert" %>
</li>
<% else %>
<li class="nav-item">
<%= link "Sign in with Google", to: Routes.auth_path(@conn, :request, "google", scope: "email profile"), class: "button" %>
</li>
<% end %>
</ul>
I really can’t see which part of quoted expression could be a problem here. I searched on the web, but didn’t really find anyone else having the similar issue. I hope it’s something very simple I am just overlooking. Locally, it works without any problems.
Thank you so much in advance!