Skip to content

Error with ng build --prod #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hassanasad opened this issue Mar 5, 2018 · 11 comments
Closed

Error with ng build --prod #40

hassanasad opened this issue Mar 5, 2018 · 11 comments

Comments

@hassanasad
Copy link

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
Copy link

chrishawn commented Mar 5, 2018

not sure if this is related but seems to be:
angular/angular#14707

also this as well
angular/angular-cli#3854

@scott-wyatt
Copy link
Member

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
Copy link

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
Copy link

I have the same problem.

@scott-wyatt
Copy link
Member

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
Copy link
Member

Fixed by #42

@eyalhakim
Copy link

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

@motcowley
Copy link

Also seeing the same problem on 6.0.0-beta.x

@chrishawn
Copy link

chrishawn commented Oct 16, 2018

yeah it definitely seems to be back

@Omi0

This comment has been minimized.

@wbhob
Copy link
Contributor

wbhob commented Oct 19, 2018

Locking this issue, please continue conversation in #74

@CaliStyle CaliStyle locked and limited conversation to collaborators Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants