CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

Production build throws error in version 1.0.0-beta.0 #18

Closed flore2003 closed 7 years ago

flore2003 commented 7 years ago

Problem When building an app using the ng-intercom library in production mode, the following error is thrown:

ERROR in /path/to/project/src/$$_gendir/node_modules/ng-intercom/intercom.module.ngfactory.ts (26,82): Argument of type '{}' is not assignable to parameter of type 'IntercomConfig'.                           
  Property 'app_id' is missing in type '{}'.

This is due to the Intercom class being specified in both the module's providers and in the providers of the forRoot() method.

Solution Only the forRoot() method should specify the Intercom class as a provider.