使用全日历和角度

时间:2019-05-28 02:01:23

标签: angular typescript fullcalendar

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

  

node_modules/@fullcalendar/core/main.d.ts(2767,14)中的错误:错误TS2484:导出声明​​与“ OptionsInput”的导出声明冲突。   node_modules/@fullcalendar/core/main.d.ts(2768,26):错误TS2484:导出声明​​与“ EventDef”的导出声明冲突。   node_modules/@fullcalendar/core/main.d.ts(2795,14):错误TS2484:导出声明​​与“ Calendar”的导出声明冲突。   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:导出声明​​与“ CalendarState”的导出声明冲突。   node_modules/@fullcalendar/core/main.d.ts(2831,14):错误TS2484:导出声明​​与“ EventMutation”的导出声明冲突。   node_modules/@fullcalendar/core/main.d.ts(2833,14):错误TS2484:导出声明​​与“ EventApi”的导出声明冲突。   node_modules/@fullcalendar/resource-common/main.d.ts(350,9):错误TS2416:类型'ResourceSplitter'中的属性'getKeysForEventDef'无法分配给基本类型'Splitter'中的相同属性。     类型'(eventDef:import(“ @ fullcalendar / core”)。EventDef)=>字符串[]'不能分配给类型'(eventDef:import(“ @ fullcalendar / core / structs / event”)。EventDef)=>串[]'。       参数'eventDef'和'eventDef'的类型不兼容。         类型'import(“ @ fullcalendar / core / structs / event”)。EventDef'不能分配给类型'import(“ @ fullcalendar / core”)。EventDef'。           类型'EventDef'中缺少属性'resourceIds'。   node_modules/@fullcalendar/resource-common/main.d.ts(486,9):错误TS2416:类型'VResourceSplitter'中的属性'getKeysForEventDef'无法分配给基本类型'Splitter'中的相同属性。     类型'(eventDef:import(“ @ fullcalendar / core”)。EventDef)=>字符串[]'不能分配给类型'(eventDef:import(“ @ fullcalendar / core / structs / event”)。EventDef)=>串[]'。       参数'eventDef'和'eventDef'的类型不兼容。         不能将类型'import(“ @ fullcalendar / core / structs / event”)。EventDef分配给类型'import(“ @ fullcalendar / core /)。EventDef'。

我的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"        
   }
}

1 个答案:

答案 0 :(得分:0)

已解决-打字稿为3.1.1,需要3.2.4+