KP123

KP123

“Module not loaded” error for PolymorphicEmbed v4.1.1

Using PolymorphicEmbed v4.1.1

I get the error: module PolymorphicEmbed.HTML.Form is not loaded and could not be found

When attempting to import the module as stated in the docs

Has anyone run into and fixed this problem? Is this an issue with the lib or something else in my project?

Originally posted in the Elixir chat but moved here for search and visibility

Marked As Solved

al2o3cr

al2o3cr

This sounds like the same issue, but the comments suggest 4.1.1 should have solved it:

https://github.com/mathieuprog/polymorphic_embed/issues/102

Do you have all the modules that this check is expecting?

https://github.com/mathieuprog/polymorphic_embed/blob/68e54e0df69da37bc48bdc160c77579a59adbdb1/lib/polymorphic_embed/html/form.ex#L1-L2

Also Liked

al2o3cr

al2o3cr

phoenix_html_helpers is listed as an optional dependency for PolymorphicEmbed, so you’ll need to add it to your project’s mix.exs explicitly.

After that, you may need to add it to the lib/whatever_web.ex file in places where use Phoenix.Component happens, for instance:

https://github.com/fly-apps/live_beats/blob/ac9780472e7019af274110a1cf71250a8d40c986/lib/live_beats_web.ex#L36-L38

Last Post!

KP123

KP123

That fixed it thanks

Where Next?

Popular in Questions Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
lanycrost
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
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement