DanielYKPan / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
562 stars 358 forks source link

could not be resolved to an NgModule class #740

Open sheng-snd opened 3 years ago

sheng-snd commented 3 years ago

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.

iamade commented 2 years ago

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.

crh225 commented 2 years ago

@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?

JosehGaks commented 2 years ago

It still doesn't work on angular cli version 13

malek-itani commented 6 months ago

@iamade I understand from your answer that we should no more use "ng-pick-datetime": "^7.0.0",

but instead we should use

"ng-pick-datetime-ex": "^15.0.0",

am I correct?