angualr8升級9問題記錄

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

由於一直不成功,我直接先手動更新腳手架

yarn add @angular/cli

後續手動升級 @angular/cli @angular/cdk等

2、執行完畢後,啓動時出錯 interFace IteratorResult<T>{}

 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: <root> ; 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這個插件報錯,嘗試升級解決。啓動成功

4)內部使用new創建外部插件報錯 The name item is already defined in scope to be [object Object]

手動添加typings.d.ts裏面的變量

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章