rangle/angular-ssr

Multiple root @NgModule discovered

AhHa45 opened this issue · 1 comments

Error: Multiple root @NgModule discovered, cannot determine the correct one (AppModuleNgFactory in src/ngfactory/src/app/app.module.ngfactory, and AppModule in src/app/app.module)

I get the above error when I execute ./node_modules/.bin/ng-render

Can you tell me how to tell ng-render what the "correct NgModule" is?
Or how to use ng-render if there are multiple NgModule s ?

Hmm, it shouldn't be picking up the NgFactory one. Do you have one call to bootstrapModule and one to bootstrapModuleFactory depending on some configuration data?

Anyway to get around this, just specify --module and --symbol to specify your bootstrap NgModule (file + symbol name respectively) and then it will avoid all that autodetection behaviour.