phoenix-liveview-chat-example
phoenix-liveview-chat-example copied to clipboard
Still some errors in instructions?
Sorry - not chasing but just tried this again as I noticed some updates. My setup
❯ elixir -v
Erlang/OTP 25 [erts-13.0] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Elixir 1.14.3 (compiled with Erlang/OTP 25)
~/projects/2023/examples/phoenix-liveview-chat-example main 13:47:56
❯ mix phx.new --version
Phoenix installer v1.7.1
git clone (https://github.com/dwyl/phoenix-liveview-chat-example.git)
Worked fine.
When I tried to build via the instructions I got some errors after section 2 and 3... Looked over the instructions a few times to see if I had made some mistakes. I have tried (https://github.com/dwyl/phoenix-chat-example) (I meant the git cloned app on my machine)
== Compilation error in file lib/liveview_chat_web/views/message_view.ex ==
** (UndefinedFunctionError) function LiveviewChatWeb.view/0 is undefined or private
(liveview_chat 0.1.0) LiveviewChatWeb.view()
(liveview_chat 0.1.0) expanding macro: LiveviewChatWeb.__using__/1
lib/liveview_chat_web/views/message_view.ex:2: LiveviewChatWeb.MessageView (module)
(elixir 1.14.3) expanding macro: Kernel.use/2
lib/liveview_chat_web/views/message_view.ex:2: LiveviewChatWeb.MessageView (module)
Compiling 1 file (.ex)
@SimonLab if you have time, please go through these errors in the instructions & update. 🙏
Hi,
I've created a version of this (up to the broadcast of messages), that works with LiveView 0.20.1 https://github.com/chargio/liveview_chat
@SimonLab It would be great if you can have a view at the code, I will create a PR with the new code if it is ok, but I need to clean up the code, and rewrite a lot of instructions, and I want to make sure that it makes sense to do it and that the PR will be accepted.
It uses the stream from Liveview 0.20, so some of the code is not needed, and I am not a good designer, so I haven't changed the interface (I am using a table generated by phx.gen.live)
Let me know if it is worth it.
A PR that simplifies code and reduces the number of steps in the instructions is always welcome! 🙏