Ideas2IT / cordova-aes256

MIT License
13 stars 20 forks source link

Error: Metadata version mismatch for module found version 4, expected 3 #9

Closed TalesMattos closed 5 years ago

TalesMattos commented 5 years ago

Error when run ionic cordova build android --prod --release When run ionic cordova build android, works. My ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.0.5
   Ionic Framework    : ionic-angular 3.5.0
   @ionic/app-scripts : 1.3.12

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.0.0

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm               : 5.6.0
   OS                : Windows 10

Environment:

   ANDROID_HOME : C:\Users\tm\AppData\Local\Android\android-sdk
$ ionic cordova build android --prod --release
> ionic-app-scripts build --prod --target cordova --platform android
[16:00:06]  ionic-app-scripts 1.3.12
[16:00:06]  build prod started ...
[16:00:06]  clean started ...
[16:00:06]  clean finished in 10 ms
[16:00:06]  copy started ...
[16:00:06]  ngc started ...
[16:00:12]  ionic-app-script task: "build"
[16:00:12]  Error: Metadata version mismatch for module
            C:/workspace/app/node_modules/@ionic-native/aes-256/index.d.ts, found version 4, expected 3
Error: Metadata version mismatch for module C:/workspace/app/node_modules/@ionic-native/aes-256/index.d.ts, found version 4, expected 3
    at StaticSymbolResolver.getModuleMetadata (C:\workspace\app\node_modules\@angular\compiler\bundles\compiler.umd.js:24474:34)
    at StaticSymbolResolver._createSymbolsOf (C:\workspace\app\node_modules\@angular\compiler\bundles\compiler.umd.js:24260:46)
    at StaticSymbolResolver.getSymbolsOf (C:\workspace\app\node_modules\@angular\compiler\bundles\compiler.umd.js:24241:14)
    at C:\workspace\app\node_modules\@angular\compiler\bundles\compiler.umd.js:23023:30
    at Array.forEach (<anonymous>)
    at extractProgramSymbols (C:\workspace\app\node_modules\@angular\compiler\bundles\compiler.umd.js:23022:79)
    at AotCompiler.compileAll (C:\workspace\app\node_modules\@angular\compiler\bundles\compiler.umd.js:22720:47)
    at CodeGenerator.codegen (C:\workspace\app\node_modules\@angular\compiler-cli\src\codegen.js:30:14)
    at Function.NgTools_InternalApi_NG_2.codeGen (C:\workspace\app\node_modules\@angular\compiler-cli\src\ngtools_api.js:61:30)
    at Object.doCodegen (C:\workspace\app\node_modules\@ionic\app-scripts\dist\aot\codegen.js:6:51)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
dinakarankec commented 5 years ago

@TalesMattos we will check this in same environment and let you know

TalesMattos commented 5 years ago

Hi, I solved my problem updating all @ionic-native/ dependencies to latest version ^4.18.0 and updanting all @angular/ dependencies to ^5.2.11, like:

"dependencies": {
   "@angular/animations": "^5.2.11", 
  "@angular/common": "^5.2.11", 
  ... 
  "@ionic-native/aes-256": "^4.18.0", 
  "@ionic-native/core": "^4.18.0", ....

see https://github.com/ionic-team/ionic/issues/15324

TalesMattos commented 5 years ago

Hi, I solved my problem updating all @ionic-native/ dependencies to latest version ^4.18.0 and updanting all @angular/ dependencies to ^5.2.11, like:

"dependencies": {
   "@angular/animations": "^5.2.11", 
  "@angular/common": "^5.2.11", 
  ... 
  "@ionic-native/aes-256": "^4.18.0", 
  "@ionic-native/core": "^4.18.0", ....

see ionic-team/ionic#15324

Before: @angular/* = 4.1.3 and @ionic-native/core = 3