@ionic-native/core found version 4, expected 3

#1

I have this error when i compile the apk in --prod mode

Error: Metadata version mismatch for module /home/incognits/Documents/Projects/TraeGuate/v2/TraeGuate/node_modules/@ionic-native/core/decorators.d.ts, found version 4, expected 3

My package.json:
dependencies": {
"@angular/common": “4.4.6”,
"@angular/compiler": “4.4.6”,
"@angular/compiler-cli": “4.4.6”,
"@angular/core": “4.4.6”,
"@angular/forms": “4.4.6”,
"@angular/http": “4.4.6”,
"@angular/platform-browser": “4.4.6”,
"@angular/platform-browser-dynamic": “4.4.6”,
"@ionic-native/android-permissions": “^4.3.3”,
"@ionic-native/call-number": “^4.3.3”,
"@ionic-native/camera": “^4.3.3”,
"@ionic-native/core": “^4.2.0”,
"@ionic-native/crop": “^4.3.3”,
"@ionic-native/deeplinks": “^4.3.3”,
"@ionic-native/diagnostic": “^4.3.3”,
"@ionic-native/facebook": “^4.4.0”,
"@ionic-native/fcm": “^4.3.3”,
"@ionic-native/firebase": “^4.3.3”,
"@ionic-native/firebase-dynamic-links": “^4.4.2”,
"@ionic-native/geolocation": “^4.3.3”,
"@ionic-native/network": “^4.3.3”,
"@ionic-native/push": “^4.3.3”,
"@ionic-native/social-sharing": “^4.3.3”,
"@ionic-native/splash-screen": “^4.3.3”,
"@ionic-native/status-bar": “^4.3.3”,
"@ionic/storage": “^2.0.1”,
"@ngx-translate/core": “^8.0.0”,
"@types/moment": “^2.13.0”,
“android-versions”: “^1.2.1”,
“angular2-moment”: “^1.7.0”,
“angular2-uuid”: “^1.1.1”,
“angularfire2”: “^4.0.0-rc.0”,
“blueimp-canvas-to-blob”: “^3.14.0”,
“call-number”: “^1.0.1”,
“cordova-android”: “^6.3.0”,
“cordova-browser”: “^5.0.1”,
“cordova-plugin-android-permissions”: “^1.0.0”,
“cordova-plugin-camera”: “^2.4.1”,
“cordova-plugin-compat”: “^1.2.0”,
“cordova-plugin-console”: “^1.1.0”,
“cordova-plugin-crop”: “^0.4.0”,
“cordova-plugin-device”: “^1.1.7”,
“cordova-plugin-facebook4”: “^1.9.1”,
“cordova-plugin-fcm”: “^2.1.2”,
“cordova-plugin-firebase”: “^0.1.24”,
“cordova-plugin-geolocation”: “^2.4.3”,
“cordova-plugin-network-information”: “^1.3.4”,
“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-support-google-services”: “^1.0.0”,
“cordova.plugins.diagnostic”: “^3.7.1”,
“es6-promise-plugin”: “^4.1.0”,
“firebase”: “^3.9.0”,
“geofire”: “^4.1.2”,
“ionic-angular”: “^3.9.2”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionic2-rating”: “^1.2.2”,
“ionicons”: “3.0.0”,
“jquery”: “^3.2.1”,
“material-design-icons”: “^3.0.1”,
“moment”: “^2.19.1”,
“ng2-device-detector”: “^1.0.0”,
“ng2-img-tools”: “1.1.0”,
“ng2-truncate”: “^1.3.9”,
“ngx-facebook”: “^2.4.0”,
“ngx-order-pipe”: “^1.0.2”,
“ngx-pipes”: “^2.0.3”,
“phonegap-plugin-push”: “^2.1.0”,
“promise-polyfill”: “6.0.2”,
“rxjs”: “5.4.0”,
“sw-toolbox”: “3.6.0”,
“web”: “0.0.2”,
“zone.js”: “^0.8.12”
},
“devDependencies”: {
"@angular/cli": “^1.5.0”,
"@ionic/app-scripts": “^3.1.0”,
“typescript”: “2.3”,
“webpack”: “^3.8.1”
}

#2

Update your ionic native core to latest one

#3

Thanks @vks_gautam1 i updated all @ionic-native libraries to latest!!! and it works!!!

#4

@vks_gautam1 i updated all @ionic-native libraries to latest,but it not work for me.

dependencies": {
"@angular/common": “4.1.2”,
"@angular/compiler": “4.1.2”,
"@angular/compiler-cli": “4.1.2”,
"@angular/core": “4.1.2”,
"@angular/forms": “4.1.2”,
"@angular/http": “4.1.2”,
"@angular/platform-browser": “4.1.2”,
"@angular/platform-browser-dynamic": “4.1.2”,
"@ionic-native/core": “^4.4.2”,
"@ionic-native/facebook": “^4.4.0”,
"@ionic-native/file": “^4.4.2”,
"@ionic-native/file-transfer": “^4.4.2”,
"@ionic-native/geolocation": “^4.4.2”,
"@ionic-native/httpd": “^4.4.2”,
"@ionic-native/splash-screen": “^4.4.2”,
"@ionic-native/status-bar": “^4.4.2”,
"@ionic/cloud-angular": “^0.12.0”,
"@ionic/storage": “^2.0.1”,
"@ngx-translate/core": “^6.0.1”,
"@ngx-translate/http-loader": “0.0.3”,
“angular2-uuid”: “^1.1.1”,
“cordova-android”: “6.3.0”,
“cordova-ios”: “^4.5.3”,
“cordova-plugin-compat”: “^1.2.0”,
“cordova-plugin-console”: “^1.1.0”,
“cordova-plugin-device”: “^1.1.6”,
“cordova-plugin-facebook4”: “^1.9.1”,
“cordova-plugin-file”: “^4.3.3”,
“cordova-plugin-file-transfer”: “^1.6.3”,
“cordova-plugin-geolocation”: “^2.4.3”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.3”,
“cordova-plugin-whitelist”: “^1.3.2”,
“cordova-sqlite-storage”: “^2.0.4”,
“del”: “^3.0.0”,
“font-awesome”: “^4.7.0”,
“fuse.js”: “^3.0.0”,
“ionic-angular”: “3.3.0”,
“ionic-plugin-deploy”: “^0.6.7”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“lodash”: “^4.17.4”,
“ng2-signalr”: “^2.0.4”,
“raven-js”: “^3.17.0”,
“rxjs”: “5.1.1”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “^0.8.11”
}

#5

your angular and ionic-angular could be not compatible with latest ionic native libraries.Although not sure with it

#6

I had to update angular version to latest.

Something like:

npm i --save @angular/animations@latest @angular/common@latest ... @angular/router@latest

All @angular/* dependencies. I updated to 6.1.3 version.

1 Like