-
Notifications
You must be signed in to change notification settings - Fork 91
Description
I am encountering issues when installing the @worktile/gantt library in my Angular project. The error messages indicate that certain exports from date-fns/locale are missing. Specifically, the following errors are being thrown during compilation:
[ERROR] TS2694: Namespace '"date-fns/locale"' has no exported member 'Locale'. [plugin angular-compiler]
node_modules/@worktile/gantt/i18n/locales/de-de.d.ts:4:42:
4 │ dateLocale: import("date-fns/locale").Locale;
╵ ~~~~~~
[ERROR] TS2694: Namespace '"date-fns/locale"' has no exported member 'Locale'. [plugin angular-compiler]
node_modules/@worktile/gantt/i18n/locales/ru-ru.d.ts:4:42:
4 │ dateLocale: import("date-fns/locale").Locale;
╵ ~~~~~~
[ERROR] TS2305: Module '"date-fns"' has no exported member 'FirstWeekContainsDate'. [plugin angular-compiler]
node_modules/@worktile/gantt/utils/date.d.ts:1:17:
1 │ import { Locale, FirstWeekContainsDate } from 'date-fns';
Steps to Reproduce:
-
Install the @worktile/gantt library in an Angular project.
-
Build the project or run ng serve.
-
The errors will appear in the console.
Expected Behavior: The @worktile/gantt library should install and run without any compilation issues.
Actual Behavior: Compilation fails due to missing exports (Locale and FirstWeekContainsDate) from date-fns.
Possible Solution: The issue may be related to an incompatible version of date-fns. I recommend checking the version compatibility between @worktile/gantt and date-fns. Alternatively, it may be useful to update the @worktile/gantt library to support newer versions of date-fns.
Environment:
Angular version: 17.3.12
@worktile/gantt version: 18.1.0-next.2
date-fns version: 4.1.0