[V4] Importing of Fullcalendar Resource
See original GitHub issueHi
In version 4.0 when i try import the resource core in angular using:
import ‘@fullcalendar/resource-common’;
It seems to cause havoc, what is the correct ES6 way of importing the resource-common?
All my imports in my angular component as follows:
import { Calendar } from ‘@fullcalendar/core’; import momentPlugin from ‘@fullcalendar/moment’; import {toMoment } from ‘@fullcalendar/moment’; import dayGridPlugin from ‘@fullcalendar/daygrid’; import timeGridPlugin from ‘@fullcalendar/timegrid’; import listGridPlugin from ‘@fullcalendar/list’; import ‘@fullcalendar/resource-common’; import resourceTimeGridPlugin from ‘@fullcalendar/resource-timegrid’; import resourceDayGridPlugin from ‘@fullcalendar/resource-daygrid’; import momentTimezonePlugin from ‘@fullcalendar/moment-timezone’;
It seems to break the entire calendar - multiple typescript compilation errors etc.
ERROR in node_modules/@fullcalendar/core/main.d.ts(2724,14): error TS2484: Export declaration conflicts with exported declaration of 'OptionsInput'.
node_modules/@fullcalendar/core/main.d.ts(2725,26): error TS2484: Export declaration conflicts with exported declaration of 'EventDef'.
node_modules/@fullcalendar/core/main.d.ts(2751,14): error TS2484: Export declaration conflicts with exported declaration of 'Calendar'.
node_modules/@fullcalendar/core/main.d.ts(2758,24): error TS2484: Export declaration conflicts with exported declaration of 'DateSpanApi'.
node_modules/@fullcalendar/core/main.d.ts(2758,37): error TS2484: Export declaration conflicts with exported declaration of 'DatePointApi'.
node_modules/@fullcalendar/core/main.d.ts(2778,35): error TS2484: Export declaration conflicts with exported declaration of 'CalendarState'.
node_modules/@fullcalendar/core/main.d.ts(2787,14): error TS2484: Export declaration conflicts with exported declaration of 'EventMutation'.
node_modules/@fullcalendar/core/main.d.ts(2789,14): error TS2484: Export declaration conflicts with exported declaration of 'EventApi'.
What is the correct way to import this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
Solved - Typescript was at 3.1.1 and this needs 3.2.4+
Oh sorry, I missed that page and didn’t realise it had changed.
But, I added this code to the example project to test it:
At first I got “Cannot find module”, but it works fine after installing the modules with:
npm install --save @fullcalendar/resource-daygrid @fullcalendar/resource-timegrid
So it sounds like you are doing it correctly, maybe you need to update TypeScript or clear some old files that are cached.