Using scheduler with ES6 build system + angular fails
jeremy-dentel opened this issue · 1 comments
jeremy-dentel commented
FullCalendar Version: v4.0.0-beta2
This stems from this Stack Overflow (as I also ran into the issue tonight):
https://stackoverflow.com/questions/54640441/cannot-get-fullcalendar-v4-to-work-with-angular-and-the-angular-cli?noredirect=1#comment96859003_54640441
They've created a StackBlitz where it works perfectly, but any local building of a project fails:
https://stackblitz.com/edit/angular-lec711
Issue:
node_modules/@fullcalendar/core/main.d.ts(2707,14): error TS2484: Export declaration conflicts with exported declaration of 'OptionsInput'.
node_modules/@fullcalendar/core/main.d.ts(2708,26): error TS2484: Export declaration conflicts with exported declaration of 'EventDef'.
node_modules/@fullcalendar/core/main.d.ts(2734,14): error TS2484: Export declaration conflicts with exported declaration of 'Calendar'.
node_modules/@fullcalendar/core/main.d.ts(2741,24): error TS2484: Export declaration conflicts with exported declaration of 'DateSpanApi'.
node_modules/@fullcalendar/core/main.d.ts(2741,37): error TS2484: Export declaration conflicts with exported declaration of 'DatePointApi'.
node_modules/@fullcalendar/core/main.d.ts(2760,35): error TS2484: Export declaration conflicts with exported declaration of 'CalendarState'.
node_modules/@fullcalendar/core/main.d.ts(2769,14): error TS2484: Export declaration conflicts with exported declaration of 'EventMutation'.
node_modules/@fullcalendar/core/main.d.ts(2771,14): error TS2484: Export declaration conflicts with exported declaration of 'EventApi'.
node_modules/@fullcalendar/timegrid/main.d.ts(177,9): error TS2416: Property 'getKeysForEventDef' in type 'AllDaySplitter' is not assignable to the same property in base type 'Splitter<SplittableProps>'.
Type '(eventDef: import("@fullcalendar/core").EventDef) => string[]' is not assignable to type '(eventDef: import("@fullcalendar/core/structs/event").EventDef) => string[]'.
Types of parameters 'eventDef' and 'eventDef' are incompatible.
Type 'import("@fullcalendar/core/structs/event").EventDef' is not assignable to type 'import("@fullcalendar/core").EventDef'.
Property 'resourceIds' is missing in type 'EventDef'.
src/app/views/staff/staff.component.ts(32,25): error TS2693: 'Calendar' only refers to a type, but is being used as a value here.
src/app/views/staff/staff-member.component.ts(28,25): error TS2693: 'Calendar' only refers to a type, but is being used as a value here.
node_modules/@fullcalendar/resource-common/main.d.ts(338,9): error TS2416: Property 'getKeysForEventDef' in type 'ResourceSplitter' is not assignable to the same property in base type 'Splitter<SplittableResourceProps>'.
Type '(eventDef: import("@fullcalendar/core").EventDef) => string[]' is not assignable to type '(eventDef: import("@fullcalendar/core/structs/event").EventDef) => string[]'.
Types of parameters 'eventDef' and 'eventDef' are incompatible.
Type 'import("@fullcalendar/core/structs/event").EventDef' is not assignable to type 'import("@fullcalendar/core").EventDef'.
node_modules/@fullcalendar/resource-common/main.d.ts(464,9): error TS2416: Property 'getKeysForEventDef' in type 'VResourceSplitter' is not assignable to the same property in base type 'Splitter<VResourceProps>'.
Type '(eventDef: import("@fullcalendar/core").EventDef) => string[]' is not assignable to type '(eventDef: import("@fullcalendar/core/structs/event").EventDef) => string[]'.
Types of parameters 'eventDef' and 'eventDef' are incompatible.
Type 'import("@fullcalendar/core/structs/event").EventDef' is not assignable to type 'import("@fullcalendar/core").EventDef'.
src/app/views/appointments/appointments.component.ts(18,25): error TS2693: 'Calendar' only refers to a type, but is being used as a value here.
My Package.json dependencies:
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "^7.2.8",
"@angular/common": "^7.2.8",
"@angular/compiler": "^7.2.8",
"@angular/core": "^7.2.8",
"@angular/forms": "^7.2.8",
"@angular/http": "^7.2.8",
"@angular/platform-browser": "^7.2.8",
"@angular/platform-browser-dynamic": "^7.2.8",
"@angular/router": "^7.2.8",
"@coreui/angular": "^2.4.3",
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
"@coreui/coreui-pro": "^2.1.7",
"@coreui/icons": "0.3.0",
"@fortawesome/fontawesome-pro": "^5.7.2",
"@fullcalendar/bootstrap": "^4.0.0-beta.4",
"@fullcalendar/core": "^4.0.0-beta.4",
"@fullcalendar/daygrid": "^4.0.0-beta.4",
"@fullcalendar/list": "^4.0.0-beta.4",
"@fullcalendar/resource-timeline": "^4.0.0-beta.4",
"@fullcalendar/timegrid": "^4.0.0-beta.4",
"angular2-datatable": "^0.6.0",
"angular2-ladda": "^2.0.1",
"angular2-text-mask": "^9.0.0",
"angular2-toaster": "^7.0.0",
"bootstrap": "^4.1.3",
"chart.js": "2.7.3",
"core-js": "^2.5.7",
"date-fns": "^1.29.0",
"flag-icon-css": "3.2.1",
"moment": "^2.22.2",
"mutationobserver-shim": "^0.3.2",
"ng-select": "^1.0.1",
"ng2-ace-editor": "^0.3.8",
"ng2-charts": "^1.6.0",
"ng2-dragula": "^1.5.0",
"ngx-bootstrap": "^3.1.2",
"ngx-perfect-scrollbar": "^7.2.1",
"ngx-quill": "^4.6.12",
"quill": "^1.3.6",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"simple-line-icons": "^2.4.1",
"spinkit": "^1.2.5",
"ts-helpers": "^1.1.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "^7.3.5",
"@angular/compiler-cli": "^7.2.8",
"@angular/language-service": "^7.2.8",
"@types/jasmine": "^3.3.0",
"@types/jasminewd2": "^2.0.6",
"@types/node": "^10.12.30",
"codelyzer": "^4.5.0",
"jasmine-core": "^3.3.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^3.1.3",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^5.4.1",
"ts-node": "^7.0.1",
"tslint": "^5.13.1",
"typescript": "3.1.x"
},
Some other background:
I took the demo into a fresh angular project and it worked, put the demo code into my project and came up with this error.
jeremy-dentel commented
Updating to "typescript": "~3.2.2"
worked for me.