question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while building within ng 9

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rysal32commented, Apr 13, 2020

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!! 😃 👍 👍 👍

0reactions
mattlewis92commented, Apr 14, 2020

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 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while building new Angular-9 project created ... - GitHub
I suspect that the secondary errors related to ngcc were due to a corrupt node_modules folder and is a red-herring. Re-assigning it as...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
Angular Error when building using `ng build --prod' command
I am building my angular application using ng build --prod command but it is giving me this error. It was working fine with...
Read more >
NG0201: No provider for {token} found! - Angular
To fix the error ensure that your service is registered in the list of providers of an NgModule or has the @Injectable decorator...
Read more >
Error ng serve in angular tutorial Agenda app - MDBootstrap
You probably accidentally updated some packages to version compatible with Angular 9 (this project was created ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found