date-time-picker icon indicating copy to clipboard operation
date-time-picker copied to clipboard

could not be resolved to an NgModule class

Open sheng-snd opened this issue 3 years ago • 4 comments

ERROR in node_modules/ng-pick-datetime/date-time/date-time.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (ng-pick-datetime) which declares OwlDateTimeModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

sheng-snd avatar Aug 24 '21 03:08 sheng-snd

Ok so to resolve this you need to do the following

  1. run this npm i ng-pick-datetime-ex

  2. run this npm install dayjs

  3. put this in the css or scss style sheet @import "../node_modules/ng-pick-datetime-ex/assets/style/picker.min.css"; 4.put these in the module where the picker is needed OwlDateTimeModule, OwlNativeDateTimeModule,

    and you should be fine

    if there is any error do npm i

    It work for me just now.

iamade avatar Oct 05 '21 11:10 iamade

@iamade install those two packages seemed to fix my issue. Im using pnpm and was getting a similar problem. Did those packages needed to be added because they are missing peer dependencies?

crh225 avatar Jan 26 '22 15:01 crh225

It still doesn't work on angular cli version 13

JosehGaks avatar Aug 09 '22 17:08 JosehGaks