mathieuprog / polymorphic_embed

Polymorphic embeds in Ecto
Apache License 2.0
341 stars 63 forks source link

module PolymorphicEmbed.HTML.Component is not loaded and could not be found #102

Closed rubynho closed 5 months ago

rubynho commented 5 months ago

I can't find a way to use the Component or Form modules, it seems to not be compiled. I tried importing the module as the doc says, even in lib/shop_web/components/core_components.ex, but raises the message below:

error: module PolymorphicEmbed.HTML.Component is not loaded and could not be found. This may be happening because the m
odule you are trying to load directly or indirectly depends on the current module

PolymorphicEmbed.HTML.Helpers seems to be compiled:

iex(1)> Code.ensure_loaded? PolymorphicEmbed.HTML.Form
false
iex(2)> Code.ensure_loaded? PolymorphicEmbed.HTML.Component
false
iex(3)> Code.ensure_loaded? PolymorphicEmbed.HTML.Helpers
true

Elixir version: 1.16.1 (compiled with Erlang/OTP 26) Phoenix version: 1.7.12 Polymorphic Embed version: 4.0.0

mathieuprog commented 5 months ago

@SteffenDE could you have a quick look at this? 🙏🏻

SteffenDE commented 5 months ago

@mathieuprog You didn’t make a new release since https://github.com/mathieuprog/polymorphic_embed/pull/97, right? So my quick guess is that it’s this.

mathieuprog commented 5 months ago

Actually I did. @rubynho you're not on the latest version.

rubynho commented 5 months ago

Great, that works. Thanks! The version spec in the documentation could be "~> 4.0" to allow minor version updates.

mathieuprog commented 5 months ago

Okay done: https://github.com/mathieuprog/polymorphic_embed/tree/master?tab=readme-ov-file#installation 👍