angualr8升级9问题记录

1、执行ng update rxjs @angular/core @angular/cli @angular/cdk

由于一直不成功,我直接先手动更新脚手架

yarn add @angular/cli

后续手动升级 @angular/cli @angular/cdk等

2、执行完毕后,启动时出错 interFace IteratorResult{}

angualr8升级9问题记录_第1张图片

 tsconfig.json添加俩个配置项解决

"skipLibCheck": true, // 忽略所有的声明文件(*.d.ts)的类型检查。
"skipDefaultLibCheck":true, // 忽略库的默认声明文件的类型检查。

3、启动成功,但是页面报错ReferenceError:__importDefault,更新着俩个插件解决

"@angular-devkit/build-angular": "~0.900.1",
 "@angular-devkit/build-ng-packagr": "~0.900.1",

4、重新启动成功,页面报错,此时到此卡住

Unhandled Promise rejection: Directives cannot inherit Components ; Zone: ; Task: Promise.then ; Value: Error: Directives cannot inherit Components

5、重新将版本回退,重新升级

1)从新执行ng update @angular/cli --migrate-only --from 8 --to 9 升级脚手架

2)执行ng update @angular/core @angular/cli --force升级依赖

3)启动报错 An unhandled exception occurred: NGCC failed.

ng-json-view这个插件报错,尝试升级解决。启动成功

angualr8升级9问题记录_第2张图片

4)内部使用new创建外部插件报错 The name item is already defined in scope to be [object Object]

手动添加typings.d.ts里面的变量

angualr8升级9问题记录_第3张图片

你可能感兴趣的:(angular)