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: Calling NotifierModule.forRoot results in 'Error encountered resolving symbol values statically' #5

Closed
harryhahn2 opened this issue Feb 1, 2017 · 7 comments
Labels
type: bug Indicates an unintended behaviour, unexpected problem, crash

Comments

@harryhahn2
Copy link

in app.modules.ts : NotifierModule.forRoot({}) throws an error
when i build the angular2-cli project.

ERROR in Error encountered resolving symbol values statically. Calling function 'NotifierConfig', function calls are not supported. Consider replacing the function or lambda with
 a reference to an exported function, resolving symbol NotifierModule.forRoot in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular-notifier/src/notifier.module.d.ts, r
esolving symbol AppModule in C:/Entwicklung/Projekte/marenta/marenta/src/app/app.module.ts, resolving symbol AppModule in C:/Entwicklung/Projekte/marenta/marenta/src/app/app.modu
le.ts
@dominique-mueller dominique-mueller changed the title ERROR: Calling function 'NotifierConfig' ERROR: Calling NotifierModule.forRoot results in 'Error encountered resolving symbol values statically' Feb 5, 2017
@dominique-mueller
Copy link
Owner

Just published v1.0.3, which (hopefully) should fix the issue you described. For details regarding why that problem even existed I can also refer to two Angular issues:

Could you run an npm update and verify that everything works now as expected?

@dominique-mueller dominique-mueller added the type: bug Indicates an unintended behaviour, unexpected problem, crash label Feb 5, 2017
@mashhoodr
Copy link

mashhoodr commented Feb 26, 2017

@dominique-mueller Im on 1.0.3 and getting the error when using the latest CLI version (@angular/cli RC.0)

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 /Users/.../node_modules/angular-notifier/src/models/notifier-config.model.d.ts

This is not happening on the older version of the CLI (Im guessing it was not using --aot in the -prod then)

@dominique-mueller
Copy link
Owner

Hey there, quiet an interesting error you get there. I tried to reproduce it, thus created a quick Angular app with the latest version of 2.4.x, together with the latest version of the Angular CLI (RC.0).

I tried a whole bunch of constellations, such as

  • building for development
  • building for production, both with and without AoT
  • using the default configuration of angular-notifier, or passing in custom ones.

However, I'm not able to get the issue you described above.

Do you have more information about the issue, or maybe are you able to create a Plunkr showing it? Which exact Angular version are you using (latest is 2.4.8)?

@mashhoodr
Copy link

Hello @dominique-mueller

Thanks for the quick reply!

I removed my node_modules folder and reinstalled everything, so my current angular version is at 2.4.7. This issue does not happen for me if I turn AOT off, or do just ng build. Do you have any other recommendation of things I can check? I will also try creating a Plunkr to reproduce this issue.

Also I was going through the library code and I found in the components you have private variables (notifications and config) which are also being used in the html template - not sure if that was related.

Cheers.

@dominique-mueller
Copy link
Owner

The problem got described in more details in issue #7, and fixed with #8.

@mashhoodr
Copy link

@dominique-mueller thanks, I will try out the latest version.

@mashhoodr
Copy link

@dominique-mueller I can confirm the problem has been fixed for me with version 1.0.4 thanks a bunch!

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

3 participants