ng2-charts在ng服务上失败

时间:2019-11-25 02:57:01

标签: angular

this is error picture

使用ng serve启动Angular项目时出现上述错误,这是我的package.json

{
  "name": "website",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.2.4",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "bootstrap": "^4.3.1",
    "core-js": "^2.4.1",
    "echarts": "^3.2.0",
    "echarts-ng2": "^5.0.0",
    "jquery": "^3.4.1",
    "ng2-echarts": "0.0.3",
    "ngx-echarts": "^1.2.4",
    "rxjs": "^5.4.2",
    "save": "^2.4.0",
    "systemjs": "^6.1.5",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.4.10",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.3.3"
  }
}

1 个答案:

答案 0 :(得分:1)

看来ng2-charts与您的Typescript版本不兼容,这很可能是您Angular版本的依赖项。您将要确保该软件包与Angular 4.x兼容。