Ionic 5 with Angular 9 - Angular JIT compilation failed: '@angular/compiler' not loaded

前端 未结 7 1274
礼貌的吻别
礼貌的吻别 2020-12-15 16:36

Ionic 5 was announced a few hours ago (12th Feb 2020) and I upgraded my one of the small production app to Ionic 5 along with Angular 9:



        
7条回答
  •  温柔的废话
    2020-12-15 17:13

    Updated & correct solution to fix this

    Based on the answer from Tran Quang, I went to see the CHANGELOG.md of ionic-native and came to know that they recently updated their package to compile with Angular 9.

    Hence you need to update any/all dependencies of @ionic-native. For this, look at all the dependencies in your package.gson file which start with @ionic-native/ and update them one by one.

    For example, this is my package.gson:

    So I had to run the following commands to update all my @ionic-native dependencies:

    npm i @ionic-native/core@latest
    npm i @ionic-native/camera@latest
    npm i @ionic-native/firebase-x@latest
    npm i @ionic-native/splash-screen@latest
    npm i @ionic-native/status-bar@latest
    

    Same you have to do for your @ionic-native dependencies. Just make sure, those are updated minimum to v5.21.5 (because a few old releases were not working).

    Cheers

提交回复
热议问题