mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.73k stars 868 forks source link

Error while building within ng 9 #1214

Closed marcio199226 closed 4 years ago

marcio199226 commented 4 years ago

Hi I have some issues while adding your module & build it with ng 9

    ERROR in node_modules/angular-calendar/modules/calendar.module.d.ts:23:75 - error NG6005: CalendarModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

    23     static forRoot(dateAdapter: Provider, config?: CalendarModuleConfig): ModuleWithProviders;

This error is self-explainable, you should only add default type to forRoot method as described here

I hope that adding default return type to forRoot would turn into ng9 compatibility

Versions

Angular CLI: 9.0.5
Node: 12.16.1
OS: linux x64

Angular: 9.0.5
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.5
@angular-devkit/build-angular      0.900.5
@angular-devkit/build-optimizer    0.900.5
@angular-devkit/build-webpack      0.900.5
@angular-devkit/core               9.0.5
@angular-devkit/schematics         9.0.5
@angular/cdk                       9.1.1
@angular/flex-layout               9.0.0-beta.29
@angular/http                      7.2.7
@angular/material                  9.1.1
@angular/material-moment-adapter   9.1.1
@ngtools/webpack                   9.0.5
@schematics/angular                9.0.5
@schematics/update                 0.900.5
rxjs                               6.5.4
typescript                         3.7.5
webpack                            4.41.2
matts-bot[bot] commented 4 years ago

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider sponsoring me

mattlewis92 commented 4 years ago

Hey there, thanks for opening an issue and sending a PR. It's really strange because I'm using the calendar in several apps with ivy and not getting this error. But should be fixed now in 0.28.6 😄

rysal32 commented 4 years ago

Hey there, thanks for opening an issue and sending a PR. It's really strange because I'm using the calendar in several apps with ivy and not getting this error. But should be fixed now in 0.28.6 😄

Thank you very very much @mattlewis92. You saved my day!! :) 👍 👍 👍

marcio199226 commented 4 years ago

Hey I'm think is not related to ivy but to some version above 9.0.x which introduces this

mattlewis92 commented 4 years ago

Hey I'm think is not related to ivy but to some version above 9.0.x which introduces this

It's very odd as I'm not able to reproduce at all in my app and I've been using every version of 9.x as it's released 🤷‍♂️ Luckily the fix is pretty straightforward 😄