Ionic 4 Build error fixed, now Features doesnt work

I had this error, discribed here:

I fixed the error removed the Component from entryComponents and declarations on ComponentsModule.

But now, my modal gives me this error:

RROR Error: Uncaught (in promise): Error: No component factory found for SelectorPage. Did you add it to @NgModule.entryComponents?
Error: No component factory found for SelectorPage. Did you add it to @NgModule.entryComponents?

So I fix one issue and break the other :frowning:

Github REPO with code to reproduce the error:

add in declarations

declarations: [ HeaderComponent, SelectorPage ],

Same error Gokujy :frowning:

Error: No component factory found for SelectorPage. Did you add it to @NgModule.entryComponents?

Looks like the only solution is adding it on entryComponents, but doing that breaks the build, as you helped me solve on the other thread.

Code organization problems like this are hard to diagnose piecemeal. Would it be possible for you to upload a minimal repo to someplace like GitHub that includes enough code for others to reproduce your situation?

Will do sir :slight_smile:

Done, this is the repo, and the specific commit that shows the buggy code:

Great, it’s a one-line fix. Simply add SelectorPageModule to the imports stanza of your AppModule.

Awesome, this the commit with the fix, for those that ran into the same problem…

Thank you Rapropos! :smiley:

1 Like