MurhafSousli/ngx-disqus

Error in Angular v5.x

Closed this issue ยท 6 comments

Message when running build in Angular 4.0.0: ng build --aot --prod

10% building modules 6/10 modules 4 active ...eogular2/fonts/videogular.woff?hj1weiWarning: Can't resolve all parameters for DisqusService in /node_modules/ngx-disqus/disqus.service.d.ts: (?). This will become an error in Angular v5.x

But everything is working.
Thanks.

@YuriFontella Angular 5 is not out yet. I'm not sure why you are getting this message, I don't see an issue as long as it is working, have a look at DisqusService, it is no more than 10 lines

I have the same thing.. It's AOT related

Warning: Can't resolve all parameters for DisqusService in /Volumes/Data/Kwerri/projecten/sponsormatch/v2/sponsormatch-fe/node_modules/ngx-disqus/disqus.service.d.ts: (?). This will become an error in Angular v5.x

hi, it may not be the issue yet, but pretty soon it will be when angular 5x released. how can it be fixed?

@hbinduni I don't know the cause but I have seen that warning in other modules. It might be caused of ngc build, but I haven't got the time to investigate about it.
I think it is still early to worry about Angular 5, Meanwhile I would appreciate if someone can look for it and tell us what is the cause.

@MurhafSousli - can you try to replace your constructor with less fancy code:

change this:

shortname;

  constructor( @Optional() shortname: string) {
    this.shortname = shortname;
  }

to this:

  constructor( public shortname: string = undefined) {
  }

I remember that ngc has had list of statically defined annotations (descriptors) which is supported by compile time. I didn't check this for half of year so maybe that is still issue.

@Vukasin0 I will give it a try