MRebati / angular7-pubsub

Pub/Sub Service for Angular 7 and above
11 stars 3 forks source link

Can't build with --aot #4

Open nealhamilton opened 5 years ago

nealhamilton commented 5 years ago

Operating System Mac OS 10.14.5 Expected results As a developer I would be able to run ng build --aot in order to take advantage of Angular's ahead of time compilation. Actual Results

ERROR in ../angular7-pubsub/esm/src/angular7-pubsub.module.ts(8,2): Error during template compile of 'PubSubModule'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'NgModule'
    'NgModule' calls 'ɵmakeDecorator'.

ng version at time of error

Node: 10.15.3
OS: darwin x64
Angular: 8.1.3
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.3
@angular-devkit/build-angular     0.801.3
@angular-devkit/build-optimizer   0.801.3
@angular-devkit/build-webpack     0.801.3
@angular-devkit/core              8.1.3
@angular-devkit/schematics        8.1.3
@angular/cdk                      8.1.2
@angular/material                 8.1.2
@ngtools/webpack                  8.1.3
@schematics/angular               8.1.3
@schematics/update                0.801.3
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { OAuthModule } from 'angular-oauth2-oidc';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouteReuseStrategy } from '@angular/router';
import { CustomReuseStrategy } from './reuse-strategy';
import { HttpInterceptorProviders } from './services/httpInterceptors';
import { LoginComponent } from '../app/components/login/login.component';
import { HttpClientModule } from '@angular/common/http';
import { SharedModule } from './shared/shared.module';
import { HomeComponent } from './components/home/home.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PubSubModule } from 'angular7-pubsub';

@NgModule({
  declarations: [
    AppComponent,
    LoginComponent,
    HomeComponent
  ],
  imports: [
    BrowserModule,
    SharedModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    HttpClientModule,
    FormsModule,
    ReactiveFormsModule,
    PubSubModule.forRoot(),
    OAuthModule.forRoot()
  ],
  providers: [
    { provide: RouteReuseStrategy, useClass: CustomReuseStrategy },
    HttpInterceptorProviders,
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
MRebati commented 5 years ago

sorry for the delay. I was on a vacation. will look into it. the AOT was not my build option at the compilation. thanks for the informing. 🙏

rileynetadmin commented 4 years ago

Any movement on this?