function to_form/1 is undefined
I literally followed the "Getting Started With Ash And Phoenix" documentation example. Upon finishing and typing "iex - S mix phx.server" and pressing enter, I got the following error:
== Compilation error in file lib/my_ash_phoenix_app_web/example_live_view.ex ==
** (CompileError) lib/my_ash_phoenix_app_web/example_live_view.ex:41: undefined function to_form/1 (expected MyAshPhoenixAppWeb.ExampleLiveView to define such a function or for it to be imported, but none are available)
Shouldn't the framework define this function?
4 Replies
What version of phoenix are you using?
The new guides are updated to the latest version of phoenix
and that function is defined by phoenix
Oh, thanks @Zach Daniel. I have {:phoenix, "~> 1.6.12"}, which is definitely outdated. I will upgrade to the latest version and check again.
You’ll likely need to restart from the beginning
I should add a step to that tutorial to update the phx.new installer
Hmmm. Thanks again @Zach Daniel. I will check if a full restart from the beginning is needed and report this back.
Yeah. a restart from the beginning is needed.