Update RC1 - Cannot determine the module for component

Hi to all,
I’ve updated my project to the RC1: everything it’s ok, but when I build my app in production mode I receive an error from ngc:

[16:27:14] Error: Cannot determine the module for component CalendarComponent!

[16:27:14] ngc failed
[16:27:14] ionic-app-script task: “build”
[16:27:14] Error: Error

CalendarComponent it’s a custom component that I have in a common folder (a git submodule that I use in multiple projects). I’m not using that component in this project and I don’t want add it to app module declaration.

Is there a way to configure ngc to remove this error or, also better, convert it into a simple warning?

Thank you guys!

Ive run into a similar problem. Had an external oauth service module that I npm installed. It never did play nice with the current setup. Not sure if rollup is to blame or what, but as a temporary workaround, I copied the code into the project - removed the module part and just used the services.

Not the solution you are looking for, as your use case is slightly different.

You might simply need the typescript transpiler to not transpile your calendar. Try adding “exclude”: “path/to/calendar.ts” in your tsconfig.json.

Wrap your calendar component in the module and then inject the module. Here is the example of creating a module.

Thanks to both guys,
for now I opted for the solution offered by @codestellar!

1 Like

Hello all,

I am having he same problem. I hoped to use @codestellar solution too.
Could you please make available the example on plnkr.com again?