qligier / angular4-events

Events is a publish-subscribe style event system based on sqlProvider/angular2-pubsub
7 stars 4 forks source link

Aot Not Supported using angular 5 Calling function 'ɵmakeDecorator', function calls are not supported. #3

Closed hazeem1991 closed 6 years ago

hazeem1991 commented 6 years ago

I added this plugin but when i try to build with aot the it crashes

Gutto1 commented 6 years ago

I am having the same issue when I run the 'ng build --prod' command. The message that is shown is:

ERROR in angular4-events/esm/src/angular4-events.module.ts(4,2): Error during template compile of 'EventsModule'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'NgModule'
    'NgModule' calls 'ɵmakeDecorator'
qligier commented 6 years ago

Please check you have the latest version of the plugin if using Angular 5: npm install --save angular4-events@latest. I can reproduce a similar error with Angular 5 and angular4-events@4.0.1 but not with angular4-events@5.0.0.

Gutto1 commented 6 years ago

The version that is currently installed is angular4-events@5.0.0. I only get the error when I try to use ng build --prod, but when testing via ng serve it runs perfectly and give no warnings at all.

qligier commented 6 years ago

I've created a new project with angular/cli@1.7.3, angular/core@5.2.9 and angular4-events@5.0.0; building it with ng build --prod works flawlessly.

Do you have a simple example where the bug is triggered?

lsvih commented 6 years ago

angular/cli@1.7.2, angular/core@5.2.0 and angular4-events@5.0.0, couldn't reproduce this problem

qligier commented 6 years ago

Closing this issue as I could not reproduce it. If issue arises again, please don't hesitate to open a new issue with a complete description of it, thanks.