Javascript 海图不适用于角度4

Javascript 海图不适用于角度4,javascript,angular,highcharts,Javascript,Angular,Highcharts,我必须在我的一个项目中使用高图表,并且只有Angular4。但我得到以下错误,谷歌搜索后,我发现每个人都建议升级到angular 5,但在我的项目中,我只能使用angular 4。请帮忙 ERROR in Error: Metadata version mismatch for module /home/ishant/HighChartDemo/node_modules/angular-highcharts/angular-highcharts.d.ts, found version 4, ex

我必须在我的一个项目中使用高图表,并且只有Angular4。但我得到以下错误,谷歌搜索后,我发现每个人都建议升级到angular 5,但在我的项目中,我只能使用angular 4。请帮忙

ERROR in Error: Metadata version mismatch for module /home/ishant/HighChartDemo/node_modules/angular-highcharts/angular-highcharts.d.ts, found version 4, expected 3, resolving symbol AppModule in /home/ishant/HighChartDemo/src/app/app.module.ts, resolving symbol AppModule in /home/ishant/HighChartDemo/src/app/app.module.ts
at syntaxError (/home/ishant/HighChartDemo/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
at simplifyInContext (/home/ishant/HighChartDemo/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
at StaticReflector.simplify (/home/ishant/HighChartDemo/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
at StaticReflector.annotations (/home/ishant/HighChartDemo/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
at _getNgModuleMetadata (/home/ishant/HighChartDemo/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
at _extractLazyRoutesFromStaticModule (/home/ishant/HighChartDemo/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
at Object.listLazyRoutesOfModule (/home/ishant/HighChartDemo/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/home/ishant/HighChartDemo/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (/home/ishant/HighChartDemo/node_modules/@ngtools/webpack/src/plugin.js:241:66)
at _donePromise.Promise.resolve.then.then.then.then.then (/home/ishant/HighChartDemo/node_modules/@ngtools/webpack/src/plugin.js:495:24)
at process._tickCallback (internal/process/next_tick.js:109:7)
My package.json如下所示:

    {
 "name": "high-chart-demo",
 "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",
   "angular-highcharts": "^5.1.1",
    "core-js": "^2.4.1",
   "highcharts": "^6.0.3",
   "rxjs": "^5.4.2",
   "zone.js": "^0.8.14"
 },
  "devDependencies": {
   "@angular/cli": "1.4.4",
  "@angular/compiler-cli": "^4.2.4",
  "@angular/language-service": "^4.2.4",
"@types/highcharts": "^5.0.12",
"@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"
  }
 }

您需要安装@angular4 AngularHighCharts:

# install angular-highcharts and highcharts
npm i --save angular-highcharts@4 highcharts

# install highcharts typings
npm i --save-dev @types/highcharts

我不确定这一点,但错误表明版本不匹配。你试过低版本的海图吗