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

Build in Prod Mode failed #7

Closed
harryhahn opened this issue Mar 14, 2017 · 6 comments
Closed

Build in Prod Mode failed #7

harryhahn opened this issue Mar 14, 2017 · 6 comments
Labels
type: bug Indicates an unintended behaviour, unexpected problem, crash

Comments

@harryhahn
Copy link

When i build in --Prod Mode the build failed with:
ERROR in Error encountered resolving symbol values statically. Could not resolve type NotifierOptions (position 116:37 in the original .ts file), resolving symbol NotifierConfig in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular-n otifier/src/models/notifier-config.model.d.ts

ng b --prod => ERROR

When disable AOT it build without ERROR

ng b --prod --aot=false => OK

Thanks

@dominique-mueller
Copy link
Owner

Could you add some details about how you use the library, in particular whether - and if how - you define custom options for this library? This would really help me trying to reproduce your issues. Thanks!

@harryhahn
Copy link
Author

in app.modules.ts

import { NotifierModule, NotifierOptions } from 'angular-notifier';
...
export const  customNotifierOptions: NotifierOptions =
  {  position: {
    horizontal: {
      position: 'right',
      distance: 20
    },
    vertical: {
      position: 'top',
      distance: 100,
      gap: 10
    }
  },
  theme: 'material',
  behaviour: {
    autoHide: 4000,
    onClick: false,
    onMouseover: 'pauseAutoHide',
    showDismissButton: true,
    stacking: 4
  },
  animations: {
    enabled: true,
    show: {
      preset: 'slide',
      speed: 300,
      easing: 'ease'
    },
    hide: {
      preset: 'fade',
      speed: 300,
      easing: 'ease',
      offset: 50
    },
    shift: {
      speed: 300,
      easing: 'ease'
    },
    overlap: 150
  }
};

...
imports: [
...
    NotifierModule.forRoot(customNotifierOptions),
`

i use it without customNotifierOptions. same issues.

in my start.component.ts


`import { NotifierService } from 'angular-notifier';

@Component({
  selector: 'app-start',
  templateUrl: './start.component.html',
  styleUrls: ['./start.component.css']
})
export class StartComponent implements OnInit {
  private notifier: NotifierService;
  
  constructor(private af: AngularFire, private authService: AuthService,
               notifier: NotifierService
  ) {
     this.notifier =  notifier;
  }

...
  logoutUser( ){
  ..
    this.notifier.notify( 'success', 'Benutzer erfolgreich abgemeldet.' );
  }
`

I hope it help.
Thanks!

here the exact Error Message


`ERROR in Error encountered resolving symbol values statically. Could not resolve type NotifierOptions (position 116:37 in the original .ts file), resolving symbol NotifierConfig in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular-no
tifier/src/models/notifier-config.model.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Entwicklung\Projekte\marenta\marenta\src'
 @ ./src/main.ts 5:0-74
 @ multi ./src/main.ts
`

@dominique-mueller
Copy link
Owner

May be related to angular/angular#12631, which then again was fixed 5 days ago by angular/angular#14894.

Will dive deeper into this issue during the upcoming days.

@dominique-mueller
Copy link
Owner

dominique-mueller commented Mar 21, 2017

It actually was the issue referenced above - it got fixed for Angular 4 (for RC4 in particular). I've implemented a fix for angular-notifier to also make AoT compilation work with Angular 2, and will release version 1.0.4 within the next few minutes.

@dominique-mueller
Copy link
Owner

Just released version 1.0.4 to NPM - @harryhahn, can you verify that everything is working fine for you now?

@harryhahn
Copy link
Author

Great
it works fine:
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unintended behaviour, unexpected problem, crash
Projects
None yet
Development

No branches or pull requests

2 participants