CaliStyle / ng-intercom

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

Error with ng build --prod #40

Closed hassanasad closed 6 years ago

hassanasad commented 6 years ago

With version 1.0.0-beta.12 - when ng build --prod is called it fails to compile saying:

ERROR in Error during template compile of 'CoreModule'
  Function calls are not supported in decorators but 'IntercomModule' was called.

P.S: I use a CoreModule instead of AppModule

It works fine with 1.0.0-beta.11 though

Angular CLI: 1.7.2
Node: 9.5.0
OS: darwin x64
Angular: 5.2.7
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cli: 1.7.2
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0
chrishawn commented 6 years ago

not sure if this is related but seems to be: https://github.com/angular/angular/issues/14707

also this as well https://github.com/angular/angular-cli/issues/3854

scott-wyatt commented 6 years ago

It seems it might be related indeed @chrishawn. It might also be related to ng-packagr which is now used to output the library. PRs are welcome, I don't think I will be able to get to it until this weekend.

chrishawn commented 6 years ago

i poked around with it for a little while both options didn't seem to fix it, i think one needs to dig deeper, also many people having problems with this.

KromPass commented 6 years ago

I have the same problem.

scott-wyatt commented 6 years ago

Sorry everyone, I've been busy. This error is being caused by ng-packagr, I'll try and get a fix out for this as soon as possible unless someone beats me to it.

scott-wyatt commented 6 years ago

Fixed by #42

eyalhakim commented 5 years ago

@scott-wyatt this reproduces now for me in beta.6

motcowley commented 5 years ago

Also seeing the same problem on 6.0.0-beta.x

chrishawn commented 5 years ago

yeah it definitely seems to be back

Omi0 commented 5 years ago

Its 100% back. 6.0.0-beta.6

wbhob commented 5 years ago

Locking this issue, please continue conversation in #74