Ruben Szekér
Ruben Szekér

Reputation: 1175

Importing angular2-calendar-heatmap causes JIT compilation error

I'm working on an Angular application (version 9.0.3) and I recently wanted to implement a calendar module, so I browsed the web and stumbled across angular2-calendar-heatmap. I decided this was fit for my project, so I decided to add it and it gave the following error:

enter image description here

What I did:

What I tried

What I already know

Upvotes: 1

Views: 297

Answers (1)

Ruben Szekér
Ruben Szekér

Reputation: 1175

I did find a way to get rid of the error thanks to an answer in this post. I simply quit the current server and restarted it with ng serve.

However, I still have other errors. I get Cannot declare 'CalendarHeatmap' in a NgModule as it's not a part of the current compilation.because CalendarHeatmap is added in declarations, so changed it to imports, but that also didn't solve the issue because this gave the following error: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class

However, I found another package that also offers calendars and more detailed, it's called angular calendar and seems to offer more options. I also got the same error here. I just had to close the server and restart it with ng serveand then I got it to work.

Upvotes: 1

Related Questions