angular - Error while migrating from Angular 7 to Angular 9
问题描述
I have followed the second answer of this thread and successfully migrated to Angular 9. Now I am facing the following issue in browser console while running the project.
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"
}
}
Version
This code was working fine with Angular 7. Please help me out.
解决方案
像这样第一次更新到 Angular 8 的最终版本
ng update @angular/cli@8 @angular/core@8
版本 9 的更新
ng update @angular/cli @angular/core
检查这个如何更新到版本 9
推荐阅读
- python-3.x - 为什么我会从这个简单的 python 函数中得到意想不到的结果?
- c# - 自定义类以扩展 C# dll 中的功能
- numpy - 如何获得 0 到 1 之间的 sigmoid 函数以获得正确答案的概率?
- twitter-bootstrap - 如何在引导日期时间选择器中将选定日期转换为 DAY
- applescript - YouTube-dl (AppleScript) 的 Automator 工作流程有什么问题
- image - 来自 Jupyter Markdown 单元格中的相对路径的图像未在 Github 上呈现
- regex - React Router Dom v5:无法识别 GUID / UUID 的正则表达式路径
- python-3.x - Pytest:如何调用夹具的补丁
- python-3.x - 如何在 Ubuntu 20.04 中默认设置 python 3.7?
- python - 输入给出未知的语法错误 - 其他一切正常