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

Error "Function calls are not supported in decorators but 'SocketIoModule' was called" #2

Open
bkimminich opened this issue Sep 25, 2018 · 3 comments

Comments

@bkimminich
Copy link

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

When importing and configuring this module as documented the above errors occurs. See https://github.com/bkimminich/juice-shop/blob/gsoc-frontend/frontend/src/app/app.module.ts#L128.

The behavior can be reproduced by

  1. git clone https://github.com/bkimminich/juice-shop
  2. cd juice-shop
  3. git checkout gsoc-frontend
  4. npm install

I did not experience this problem when using e.g. ng-io which is a fork from the same origin repo, but unfortunately without your ngZone.runOutsideAngular fix.

@bkimminich
Copy link
Author

bkimminich commented Sep 25, 2018

A failing build can be found here: https://travis-ci.org/bkimminich/juice-shop/jobs/433126736#L715
The component unit test works fine (https://github.com/bkimminich/juice-shop/blob/gsoc-frontend/frontend/src/app/app.component.spec.ts#L41). Only when doing --aot/--prod builds this error occurs.

Any hint for what might be wrong is appreciated! 🆘

@bkimminich
Copy link
Author

A seemingly related issue: angular/angular#23609

@zardilior
Copy link

Maybe you can be helped by seeing this example from another library dschnelldavis/angular2-json-schema-form#189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants