mayulu
(FunctionClauseError) no function clause matching in anonymous fn/1 in EEx.Compiler.tokenize/6
My project works under Phoenix1.6.6. After upgraded to 1.6.12, It compiled error, and I cannot understand the compilation result information, as followed:
== Compilation error in file lib/linlang_web/views/user_session_view.ex ==
** (FunctionClauseError) no function clause matching in anonymous fn/1 in EEx.Compiler.tokenize/6
The following arguments were given to anonymous fn/1 in EEx.Compiler.tokenize/6:
# 1
{{1, 71}, [102, 111, 117, 110, 100, 32, 113, 117, 111, 116, 101, 100, 32, 107, 101, 121, 119, 111, 114, 100, 32, 34, 'social', 34, 32, 98, 117, 116, 32, 116, 104, 101, 32, 113, 117, 111, 116, 101, 115, 32, 97, 114, 101, 32, 110, 111, 116, 32, ...]}
(eex 1.14.0) lib/eex/compiler.ex:68: anonymous fn/1 in EEx.Compiler.tokenize/6
(elixir 1.14.0) lib/enum.ex:975: Enum."-each/2-lists^foreach/1-0-"/2
(eex 1.14.0) lib/eex/compiler.ex:68: EEx.Compiler.tokenize/6
(eex 1.14.0) lib/eex.ex:218: EEx.compile_string/2
(phoenix_view 1.1.2) lib/phoenix/template.ex:419: Phoenix.Template.compile/3
(phoenix_view 1.1.2) lib/phoenix/template.ex:197: anonymous fn/4 in Phoenix.Template."MACRO-__before_compile__"/2
(elixir 1.14.0) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_view 1.1.2) expanding macro: Phoenix.Template.__before_compile__/1
And in the user_session_view.ex file is just:
defmodule LinlangWeb.UserSessionView do
use LinlangWeb, :view
end
Can anyone enlight me?
Thanks!
Marked As Solved
mayulu
Hi,
I finally found the error.
One of the template file contains some code like this:
Routes.user_session_path(@conn, :auth_phone_number, %{"social": @conn.params["social"], "phone": @conn.params["phone"]}
And I fixed to :
Routes.user_session_path(@conn, :auth_phone_number, %{"social" => @conn.params["social"], "phone" => @conn.params["phone"]}
Everything is ok.
I wonder why the previous phx version compile the code success.
Anyway thank you very much. ![]()
1
Popular in Questions
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Hi,
is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Other popular topics
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch.
This project took far...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
New
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
Got a question about when to concat vs. prepending items to list then reversing to achieve appending.
So i know lists boil down to [1 | ...
New
Hi everyone,
I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








