Cannot Build : Metadata version mismatch for module , found version 4, expected 3
See original GitHub issueBug Report
Ionic Info
Run ionic info
from a terminal/cmd prompt and paste the output below.
✔ Gathering environment info - done!
Ionic:
ionic (Ionic CLI) : 4.1.1
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0, browser 5.0.3, ios 4.5.5
Cordova Plugins : no whitelisted plugins (15 plugins total)
System:
Android SDK Tools : 26.1.1 (/Users/raphaelkoch/Library/Android/sdk/)
ios-deploy : 1.9.2
NodeJS : v6.11.1 (/usr/local/bin/node)
npm : 5.4.2
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Describe the Bug While executing :
ionic cordova build ios --prod --release"
I get the following error 👍
[17:07:52] ionic-app-script task: "build"
[17:07:52] Error: Metadata version mismatch for module
/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@ionic-native/core/decorators.d.ts, found version 4,
expected 3
Error: Metadata version mismatch for module /Users/raphaelkoch/Documents/Ionic_Source/node_modules/@ionic-native/core/decorators.d.ts, found version 4, expected 3
at StaticSymbolResolver.getModuleMetadata (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler/bundles/compiler.umd.js:25616:34)
at StaticSymbolResolver._createSymbolsOf (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler/bundles/compiler.umd.js:25404:46)
at StaticSymbolResolver.getSymbolsOf (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler/bundles/compiler.umd.js:25385:14)
at /Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler/bundles/compiler.umd.js:24241:30
at Array.forEach (native)
at extractProgramSymbols (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler/bundles/compiler.umd.js:24240:79)
at AotCompiler.analyzeModulesAsync (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler/bundles/compiler.umd.js:23796:47)
at CodeGenerator.codegen (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler-cli/src/codegen.js:32:14)
at Function.NgTools_InternalApi_NG_2.codeGen (/Users/raphaelkoch/Documents/Ionic_Source/node_modules/@angular/compiler-cli/src/ngtools_api.js:73:30)
at /Users/raphaelkoch/Documents/Ionic_Source/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:182:73
[ERROR] An error occurred while running subprocess ionic-app-scripts.
ionic-app-scripts build --prod --target cordova --platform ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Steps to Reproduce Steps to reproduce the behavior:
- ionic cordova build ios --prod --release I have the same issue for android if I remove the --prod, I can compile without any issue
Related Code Build IOS, Expected Behavior A clear and concise description of what you expected to happen.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top Results From Across the Web
ERROR in Metadata version mismatch for module X found ...
Symptom. This is a general pattern that applies to the build error ERROR in Metadata version mismatch for module <X> found version 4,...
Read more >Metadata version mismatch for module found version 4 ...
I'm having issues building my Angular 4.2 app with bugsnag-angular ... Metadata version mismatch for module found version 4, expected 3 #12.
Read more >Metadata version mismatch for module /mobile/node_modules ...
Hi I have this error when try to run a command: sudo ionic cordova run android --prod --release. Error: ionic-app-script task: "build" ...
Read more >Solving error mismatch beetwen Angular versions - Medium
Today want present to you a lite development tool called “RepairMismatch”, that aid to me integrating recent angular packages in a Angular 4...
Read more >Metadata version mismatch for module while creation a ...
I made changes in node modules/@angular/compiler.bundles/complire.umd because had problems while creating a prod build (ionic cordova build browser --prod) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It appears that I was running late version inside the package json, here is my new version. I also had to ‘npm install’ all the newest packages before I could build again !
“dependencies”:
{ “@angular/common”: “5.2.11”, “@angular/compiler”: “5.2.11”, “@angular/compiler-cli”: “5.2.11”, “@angular/core”: “5.2.11”, “@angular/forms”: “5.2.11”, “@angular/http”: “5.2.11”, “@angular/platform-browser”: “5.2.11”, “@angular/platform-browser-dynamic”: “5.2.11”, “@angular/tsc-wrapped”: “4.4.7”, “@ionic-native/android-permissions”: “~4.11.0”, “@ionic-native/camera”: “~4.11.0”, “@ionic-native/core”: “~4.11.0”, “@ionic-native/device”: “~4.11.0”, “@ionic-native/file”: “~4.11.0”, “@ionic-native/file-path”: “~4.11.0”, “@ionic-native/file-transfer”: “~4.11.0”, “@ionic-native/geolocation”: “~4.11.0”, “@ionic-native/google-maps”: “^4.9.1”, “@ionic-native/keyboard”: “~4.11.0”, “@ionic-native/network”: “~4.11.0”, “@ionic-native/photo-viewer”: “~4.11.0”, “@ionic-native/social-sharing”: “~4.11.0”, “@ionic-native/splash-screen”: “~4.11.0”, “@ionic-native/status-bar”: “~4.11.0”, “@ionic/storage”: “2.1.3”, “ajv”: “^5.3.0”, “balanced-match”: “^1.0.0”, “big-integer”: “^1.6.26”, “brace-expansion”: “^1.1.8”, “cordova-android”: “6.3.0”, “cordova-android-support-gradle-release”: “^1.4.4”, “cordova-browser”: “5.0.4”, “cordova-common”: “^2.1.0”, “cordova-ios”: “4.5.5”, “cordova-plugin-android-permissions”: “^1.0.0”, “cordova-plugin-camera”: “^4.0.3”, “cordova-plugin-compat”: “^1.2.0”, “cordova-plugin-device”: “^2.0.2”, “cordova-plugin-file”: “^6.0.1”, “cordova-plugin-filepath”: “^1.4.2”, “cordova-plugin-geolocation”: “^2.4.3”, “cordova-plugin-googlemaps”: “^2.1.1”, “cordova-plugin-googlemaps-sdk”: “git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git”, “cordova-plugin-splashscreen”: “^4.1.0”, “cordova-plugin-statusbar”: “^2.3.0”, “cordova-plugin-whitelist”: “^1.3.3”, “cordova-plugin-x-socialsharing”: “^5.2.1”, “cordova-serve”: “^2.0.0”, “cordova-sqlite-storage”: “^2.1.4”, “es6-promise-plugin”: “^4.1.0”, “ionic-angular”: “^3.9.2”, “ionic-plugin-keyboard”: “^2.2.1”, “ionicons”: “3.0.0”, “localforage”: “^1.5.5”, “localforage-cordovasqlitedriver”: “^1.6.0”, “mime-types”: “^2.1.17”, “parseurl”: “^1.3.2”, “rollup”: “^0.50.1”, “rxjs”: “^5.5.2”, “sw-toolbox”: “3.6.0”, “uglify-js”: “^3.1.9”, “zone.js”: “^0.8.18” }, “devDependencies”: { “@ionic/app-scripts”: “3.2.0”, “ionic”: “4.1.1”, “typescript”: “~2.6.2” },
hope that this is helping you…
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.