Metadata version mismatch
Hi !
When I try to load ionic cordova run ios --prod (or android), I get this error :
Error: Metadata version mismatch for module /Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@ionic-native/google-analytics/index.d.ts, found version 4, expected 3 at StaticSymbolResolver.getModuleMetadata (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler/bundles/compiler.umd.js:25755:34) at StaticSymbolResolver._createSymbolsOf (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler/bundles/compiler.umd.js:25543:46) at StaticSymbolResolver.getSymbolsOf (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler/bundles/compiler.umd.js:25524:14) at /Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler/bundles/compiler.umd.js:24381:30 at Array.forEach (native) at extractProgramSymbols (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler/bundles/compiler.umd.js:24380:79) at AotCompiler.analyzeModulesAsync (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler/bundles/compiler.umd.js:23936:47) at CodeGenerator.codegen (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler-cli/src/codegen.js:32:14) at Function.NgTools_InternalApi_NG_2.codeGen (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@angular/compiler-cli/src/ngtools_api.js:73:30) at Object.doCodegen (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules/@ionic/app-scripts/dist/aot/codegen.js:6:51)
This is my ionic info :
cli packages: (/Users/alexandre/Sites/app-mobiles/LeRugbynistere/LeRugbynistere/node_modules)
@ionic/cli-utils : 1.18.0
ionic (Ionic CLI) : 3.18.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.3.0 ios 4.5.3
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v7.5.0
npm : 2.15.12
OS : macOS High Sierra
Xcode : Xcode 9.1 Build version 9B55
Environment Variables:
ANDROID_HOME : /Users/alexandre/Library/Android/sdk/
Misc:
backend : pro
I use version ^4.4.0 of your package.
Thanks for your support.
I'm getting the same thing.
As a hack, changing the version back to 3 within index.metadata.json seems to get past this error. I have not done any testing to validate whether that change has a negative impact.
I'm just sharing what I know at this point based on a Stackoverflow post that seemed to indicate that this approach might resolve the issue: https://stackoverflow.com/questions/47115649/metadata-version-mismatch-with-angular-4.
I've try your solution and I get a blank screen when i run cordova ionic run ios (or android) --prod.
My application perfectly works whitout google Analytics.
I've just pushed the demo code (from readme package) on platform ready function.
EDIT : Just import ionic npm package make white screen... When I removed it, it works perfectly.
It seems like Firebase Analytics is where things have quickly moved to, so I don't think we'll get much support for Google Analytics in Ionic at this point.
It seems like Firebase Analytics is where things have quickly moved to, so I don't think we'll get much support for Google Analytics in Ionic at this point.