Issue
I just upgraded to ionic 5 -- and my prod build fails with the following:
ERROR in ./node_modules/@ionic/angular/fesm2015/ionic-angular.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined
Debug build works well.
Solution
To fix this,
Make sure your dependencies are
dependencies:
"@angular/common": "8.2.13",
"@angular/core": "8.2.13",
"@angular/forms": "8.2.13",
"@angular/platform-browser": "8.2.13",
"@angular/platform-browser-dynamic": "8.2.13",
"@angular/pwa": "^0.803.23",
"@angular/router": "8.2.13",
"@angular/service-worker": "^8.2.14",
dev dependencies:
"@angular-devkit/architect": "^0.803.23",
"@angular-devkit/build-angular": "^0.803.23",
"@angular-devkit/core": "^8.3.23",
"@angular-devkit/schematics": "^8.3.23",
"@angular/cli": "^8.3.23",
"@angular/compiler": "8.2.13",
"@angular/compiler-cli": "8.2.13",
"@angular/language-service": "^8.2.14",
"@ionic/angular-toolkit": "^2.1.2",
specifically note, 8.2.13 for angular instead of 8.1 that I had.
Also take a look at: https://github.com/ionic-team/ionic/issues/20341
Answered By - Mayank R Jain
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.