从Angular 7迁移到Angular 9时出错

时间:2020-03-03 11:30:14

标签: angular typescript ivy

我已经遵循了这个thread的第二个答案,并成功地迁移到了Angular9。现在,在运行项目时,我在浏览器控制台中面临以下问题。

Error

package.json

"dependencies": {
    "@angular-devkit/build-angular": "^0.900.4",
    "@angular/animations": "9.0.4",
    "@angular/cdk": "^9.1.0",
    "@angular/common": "9.0.4",
    "@angular/compiler": "9.0.4",
    "@angular/core": "9.0.4",
    "@angular/forms": "9.0.4",
    "@angular/http": "7.2.16",
    "@angular/material": "^9.1.0",
    "@angular/material-moment-adapter": "9.1.0",
    "@angular/platform-browser": "9.0.4",
    "@angular/platform-browser-dynamic": "9.0.4",
    "@angular/platform-server": "9.0.4",
    "@angular/router": "^9.0.4",
    "@types/underscore": "1.9.4",
    "angular-highcharts": "^9.0.2",
    "angular2-jwt": "*",
    "bootstrap": "4.4.1",
    "chart.js": "2.9.3",
    "core-js": "3.6.4",
    "font-awesome": "*",
    "http-client": "*",
    "http-headers": "*",
    "rxjs": "6.5.4",
    "rxjs-compat": "^6.5.4",
    "socket.io-client": "^2.3.0",
    "tether": "1.4.7",
    "underscore": "^1.9.2",
    "vm": "*",
    "zone.js": "0.10.2"
  },
  "devDependencies": {
    "@angular/cli": "^9.0.4",
    "@angular/compiler-cli": "9.0.4",
    "codelyzer": "5.2.1",
    "concurrently": "5.1.0",
    "lodash": "4.17.15",
    "tslint": "6.0.0",
    "typescript": "^3.6.4"
  }
}

版本

enter image description here

此代码在Angular 7上运行良好。请帮帮我。

1 个答案:

答案 0 :(得分:4)

像这样Angular 8最终版本的第一次更新

ng update @angular/cli@8 @angular/core@8

版本9的更新

ng update @angular/cli @angular/core

选中此How to update to version 9