错误 TS2484 和 TS2416 使用带角度的完整日历



我在我的角度项目中添加了fullcalendar,当我启动ng serve时遇到了这些错误:

node_modules/@fullcalendar/core/main.d.ts(2767,14) 中的错误:错误 TS2484:导出声明与"选项输入"的导出声明冲突。 node_modules/@fullcalendar/core/main.d.ts(2768,26):错误 TS2484:导出声明与导出的"EventDef"声明冲突。 node_modules/@fullcalendar/core/main.d.ts(2795,14):错误 TS2484:导出申报与导出的"日历"申报冲突。 node_modules/@fullcalendar/core/main.d.ts(2802,24):错误 TS2484:导出声明与导出的"DateSpanApi"声明冲突。 node_modules/@fullcalendar/core/main.d.ts(2802,37):错误 TS2484:导出声明与导出的"DatePointApi"声明冲突。 node_modules/@fullcalendar/core/main.d.ts(2822,35):错误 TS2484:导出声明与"日历状态"的导出声明冲突。 node_modules/@fullcalendar/core/main.d.ts(2831,14):错误 TS2484:导出声明与导出的"事件突变"声明冲突。 node_modules/@fullcalendar/core/main.d.ts(2833,14):错误 TS2484:导出声明与导出的"EventApi"声明冲突。 node_modules/@fullcalendar/resource-common/main.d.ts(350,9):错误 TS2416:类型"资源拆分器"中的属性"getKeysForEventDef"不能分配给基类型"拆分器"中的同一属性。 键入 '(eventDef: import("@fullcalendar/core")。EventDef) => string[]' 不能分配给类型 '(eventDef: import("@fullcalendar/core/structs/event")。EventDef) => string[]'. 参数类型"eventDef"和"eventDef"不兼容。 键入 'import("@fullcalendar/core/structs/event")。EventDef' 不能分配给类型"import("@fullcalendar/core")。事件定义'。 属性 'resourceIds' 在类型"EventDef" 中缺失。 node_modules/@fullcalendar/resource-common/main.d.ts(486,9):错误 TS2416:类型"VResourceSplitter"中的属性"getKeysForEventDef"不能分配给基本类型"Splitter"中的同一属性。 键入 '(eventDef: import("@fullcalendar/core")。EventDef) => string[]' 不能分配给类型 '(eventDef: import("@fullcalendar/core/structs/event")。EventDef) => string[]'. 参数类型"eventDef"和"eventDef"不兼容。 键入 'import("@fullcalendar/core/structs/event")。EventDef' 不能分配给类型"import("@fullcalendar/core")。事件定义'。

我的package.json

{  
"name":"material-angularcli",
"version":"0.0.0",
"scripts":{  
"ng":"ng",
"start":"ng serve",
"build":"ng build",
"test":"ng test",
"lint":"ng lint",
"e2e":"ng e2e"        
},
"private":true,
"dependencies":{  
"@agm/core":"^1.0.0-beta.3",
"@angular/animations":"^7.2.8",
"@angular/cdk":"^2.0.0-beta.12",
"@angular/compiler":"^7.2.8",
"@angular/core":"^7.2.8",
"@angular/forms":"^7.2.8",
"@angular/http":"^7.2.8",
"@angular/material":"^2.0.0-beta.12",
"@angular/platform-browser":"^7.2.8",
"@angular/platform-browser-dynamic":"^7.2.8",
"@angular/platform-server":"^7.2.8",
"@angular/router":"^7.2.8",
"@fullcalendar/angular":"^4.1.1",
"@fullcalendar/core":"^4.1.0",
"@fullcalendar/daygrid":"^4.1.0",
"@fullcalendar/interaction":"^4.1.0",
"@fullcalendar/resource-common":"^4.1.0",
"@fullcalendar/resource-timeline":"^4.1.0",
"@fullcalendar/timeline":"^4.1.0",
"@ionic-native/core":"^4.12.0",
"@ionic-native/file":"^4.12.0",
"@ionic-native/network":"^4.12.0",
"@ng-bootstrap/ng-bootstrap":"^1.1.2",
"@ngx-translate/core":"^8.0.0",
"@ngx-translate/http-loader":"^1.0.2",
"@sentry/browser":"^4.0.6",
"@types/dhtmlxgantt":"^4.0.34",
"@types/google-maps":"^3.2.0",
"@types/googlemaps":"^3.30.12",
"@types/socket.io-client":"^1.4.32",
"angular":"^1.7.7",
"angular2-moment":"^1.9.0",
"chart.js":"^2.7.3",
"core-js":"^2.5.7",
"datatables.net":"^1.10.19",
"datatables.net-bs":"^1.10.19",
"datatables.net-colreorder":"^1.5.1",
"datatables.net-colreorder-bs":"^1.5.1",
"datatables.net-responsive":"^2.2.3",
"datatables.net-responsive-bs":"^2.2.3",
"datatables.net-select":"^1.2.7",
"datatables.net-select-bs":"^1.2.7",
"dhtmlx-gantt":"^4.2.1",
"fsevents":"^2.0.7",
"install":"^0.12.2",
"intl":"^1.2.5",
"ionicons":"^3.0.0",
"jquery":"^3.4.1",
"moment-timezone":"^0.5.25",
"ng-bootstrap":"^0.46.0",
"ng2-charts":"^2.0.0-beta.20",
"ng2-dnd":"^4.2.0",
"ng2-json-editor":"^0.25.12",
"ngx-bootstrap":"^1.8.1",
"ngx-date-picker":"0.0.24",
"ngx-datetime-picker":"^1.2.0",
"ngx-eonasdan-datetimepicker":"^1.0.6",
"ngx-select2":"^0.1.3",
"ngx-spinner":"^1.2.0",
"ngx-uploader":"^7.1.0",
"node-js-marker-clusterer":"^1.0.0",
"node-pre-gyp":"^0.13.0",
"npm":"^6.9.0",
"primeng":"^4.3.0",
"quill-image-resize-module":"^1.0.0",
"raven-js":"^3.26.4",
"return-deep-diff":"^0.2.9",
"rxjs":"^6.4.0",
"rxjs-compat":"^6.4.0",
"socket.io-client":"^2.1.1",
"ts-helpers":"^1.1.2",
"tslib":"^1.9.0",
"vis":"^4.21.0",
"zone.js":"^0.8.29"        
},
"devDependencies":{  
"@angular-devkit/build-angular":"~0.13.0",
"@angular/cli":"^7.3.9",
"@angular/common":"^7.2.15",
"@angular/compiler-cli":"^7.2.8",
"@angular/language-service":"^7.2.8",
"@fortawesome/fontawesome-pro":"^5.8.2",
"@mdi/font":"^3.6.95",
"@types/jasmine":"2.5.53",
"@types/jquery":"^3.3.29",
"@types/node":"^8.10.28",
"codelyzer":"~3.1.2",
"jasmine-core":"~2.7.0",
"jasmine-spec-reporter":"~4.2.0",
"karma":"~1.7.0",
"karma-chrome-launcher":"~2.2.0",
"karma-cli":"~1.0.1",
"karma-coverage-istanbul-reporter":"^1.4.3",
"karma-jasmine":"^1.1.2",
"karma-jasmine-html-reporter":"^0.2.2",
"ngx-color-picker":"^4.5.3",
"protractor":"~5.1.2",
"ts-node":"~3.3.0",
"tslint":"~5.6.0",
"typescript":"^3.1.1"        
}
}

已解决 - 打字稿位于 3.1.1,这需要 3.2.4+

相关内容

  • 没有找到相关文章

最新更新