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

Module not found: Error: Can't resolve 'date-fns' #2

Closed
mohammad-quanit opened this issue Jan 3, 2020 · 4 comments · Fixed by #3
Closed

Module not found: Error: Can't resolve 'date-fns' #2

mohammad-quanit opened this issue Jan 3, 2020 · 4 comments · Fixed by #3
Assignees
Labels
bug Something isn't working

Comments

@mohammad-quanit
Copy link

mohammad-quanit commented Jan 3, 2020

After installing this package, when I, include their configuration in App.module and run the app, I am getting this error:

ERROR in ./node_modules/@iomechs/angular-year-calendar/fesm2015/iomechs-angular-year-calendar.js
Module not found: Error: Can't resolve 'date-fns' in '/home/mquanit/Documents/Projects/Angular Typescript Practice/shiny-ivy-app/node_modules/@iomechs/angular-year-calendar/fesm2015'

before that, i am also getting this error:

ERROR in node_modules/@iomechs/angular-year-calendar/lib/components/year-calendar/year-calendar.component.d.ts:4:34 - error TS2307: Cannot find module '@angular/cdk/overlay'.
4 import { CdkOverlayOrigin } from '@angular/cdk/overlay';
ERROR in @iomechs/angular-year-calendar/iomechs-angular-year-calendar.ts(18,5): Error during template compile of 'YearCalendarModule'
Could not resolve @angular/cdk/overlay relative to [object Object]..
There is no directive with "exportAs" set to "cdkOverlayOrigin" ("_body__month__inner__week__day {{ycConfig?.dayClass}}"
cdkOverlayOrigin
[ERROR ->]#heatMapEventDayTrigger="cdkOverlayOrigin"
(click)="eventDayCick(day, heatMapEventDayTr")

but I solved it by doing yarn add @angular/cdk/overlay, but now I am getting the above issue, which is related to date-fns i guess.

@mohammad-quanit
Copy link
Author

Solved, that issue by doing

yarn add date-fns -S

but i am wondering, why i have to install both these libs manually?

@mohammad-quanit
Copy link
Author

Is it any sample provided for heat map color directive. I am struggling to set on for myCalendarConfig property for ycConfig

@AhsanAyaz
Copy link
Contributor

@mohammad-quanit thanks for reporting the issue 👍
I'm looking into fixing the date-fns issue. I know why it's happening. Should be fixed with the next release.
Regarding the heat map color directive, can you please open a new issue with details to what you've tried and what seems to be the issue?
Thanks!

@AhsanAyaz AhsanAyaz self-assigned this Jan 4, 2020
@AhsanAyaz AhsanAyaz added the bug Something isn't working label Jan 4, 2020
@AhsanAyaz
Copy link
Contributor

@mohammad-quanit , I've added the dependencies to peerDependencies. If you install the latest release 0.1.5. you'll see warnings about those if they're not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants