Skip to content
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

unable to build AOT #4

Open
pdecembre opened this issue Mar 1, 2018 · 1 comment
Open

unable to build AOT #4

pdecembre opened this issue Mar 1, 2018 · 1 comment
Assignees
Labels
discussion Under discussion

Comments

@pdecembre
Copy link

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

This error is happening everytime I build AOT, but only after upgrading to the latest version that fixes the [ExpressionChangedAfterItHasBeenCheckedError error]

@haoliangwu haoliangwu self-assigned this Mar 2, 2018
@haoliangwu
Copy link
Owner

haoliangwu commented Mar 2, 2018

hi @pdecembre,

thanks for your report, but I cannot reproduce the error you mentioned, I simply build my other project with ngx-loading-mask and --aot, everything works fine.

I used ngx-loading-mask@0.5.2, here is the log:

➜  ngx-previewer git:(master) npm list ngx-loading-mask
ngx-previewer@0.0.0 /Users/lyon/lyon/ngx-previewer
└── ngx-loading-mask@0.5.2

➜  ngx-previewer git:(master) ng build --aot
Your global Angular CLI version (1.7.1) is greater than your local
version (1.6.2). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
Date: 2018-03-02T06:58:47.041Z                                                - Hash: bfbf18499ded4ace1828
Time: 51568ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 147 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 201 kB [initial] [rendered]
chunk {scripts} scripts.bundle.js, scripts.bundle.js.map (scripts) 284 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 11.4 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 7.46 MB [initial] [rendered]
chunk {0} 0.chunk.js, 0.chunk.js.map () 1.52 MB  [rendered]

and the AppModule metadata

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxPreviewModule.forRoot({}, DEFAULT_VIEWER_COMPS),
    LoadingMaskModule.forRoot({
      snippet: {
        imgUrl: 'http://littlelyon.com/ngx-loading-mask/assets/ripple.svg',
        size: 144
      }
    }),
    NgZorroAntdModule.forRoot()
  ],
  providers: [],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule { }

so if you still suffer from the error, could you please give me an playground repo that I can help you figure out what's going wrong ?

thanks

@haoliangwu haoliangwu added the discussion Under discussion label Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Under discussion
Projects
None yet
Development

No branches or pull requests

2 participants