Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not be resolved to an NgModule class #740

Open
sheng-snd opened this issue Aug 24, 2021 · 4 comments
Open

could not be resolved to an NgModule class #740

sheng-snd opened this issue Aug 24, 2021 · 4 comments

Comments

@sheng-snd
Copy link

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 sheng-snd changed the title 无法识别NgModule类 could not be resolved to an NgModule class Aug 24, 2021
@iamade
Copy link

iamade commented Oct 5, 2021

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.

@chris-house
Copy link

@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
Copy link

It still doesn't work on angular cli version 13

@malek-itani
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants