search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Angular 8 ivy Error "Could not be resolved to an NgModule class"

Asked by Gert
2 years ago.

When building an application with the DayPilot Scheduler (version: 2019.3.3903) and
"angularCompilerOptions": {
"enableIvy": true
in the, I get the following error:
ERROR in ../node_modules/daypilot-pro-angular/daypilot-angular.min.d.ts:1595:22 - error TS-996002: Appears in the NgModule.imports of PlanningModule, but could not be resolved to an NgModule class
1595 export declare class DayPilotModule {

Aparently angular requires the @NgModule decorator.
So please add the @NgModule decorator.

Answer posted by Dan Letecky [DayPilot]
2 years ago.

Hi Gert,

The DayPilotModule class is decorated with @NgModule (the decorators are not visible in the daypilot-angular.min.d.ts file - they get compiled to daypilot-angular.min.metadata.json).

DayPilot should work fine with the Ivy compiler. You can try creating a new Angular 8 project using the UI Builder ( and add the "enableIvy" option to

This error message is a bit misleading and it sometimes appear if you upgrade an existing project to a higher Angular version.

I recommend deleting the node_modules folder and running "npm install" to reload the dependencies. If that doesn't help, it might be necessary to create a new Angular 8 project (using "ng new") and copy the source files over to this new project.

Please let me know if it doesn't help.

Comment posted by Dan Letecky [DayPilot]
2 years ago.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.