Ionic-native: Metadata version mismatch @ionic-native/social-sharing/index.d.ts

Created on 11 Nov 2017  路  7Comments  路  Source: ionic-team/ionic-native

[X] bug report

Current behavior:

D:\Freelance-Work\Clients\Siva\renoTracker>ionic cordova build android --prod
Running app-scripts build: --prod --platform android --target cordova
[08:23:25]  build prod started ...
[08:23:26]  clean started ...
[08:23:26]  clean finished in 20 ms
[08:23:26]  copy started ...
[08:23:26]  deeplinks started ...
[08:23:26]  deeplinks finished in 534 ms
[08:23:26]  ngc started ...
Error: Metadata version mismatch for module D:/Freelance-Work/Clients/Siva/renoTracker/node_modules/@ionic-native/social-sharing/index.d.ts, found version 4, expected 3
    at StaticSymbolResolver.getModuleMetadata (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler\bundles\compiler.umd.js:25755:34)
    at StaticSymbolResolver._createSymbolsOf (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler\bundles\compiler.umd.js:25543:46)
    at StaticSymbolResolver.getSymbolsOf (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler\bundles\compiler.umd.js:25524:14)
    at D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler\bundles\compiler.umd.js:24381:30
    at Array.forEach (native)
    at extractProgramSymbols (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler\bundles\compiler.umd.js:24380:79)
    at AotCompiler.analyzeModulesAsync (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler\bundles\compiler.umd.js:23936:47)
    at CodeGenerator.codegen (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler-cli\src\codegen.js:32:14)
    at Function.NgTools_InternalApi_NG_2.codeGen (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@angular\compiler-cli\src\ngtools_api.js:73:30)
    at Object.doCodegen (D:\Freelance-Work\Clients\Siva\renoTracker\node_modules\@ionic\app-scripts\dist\aot\codegen.js:6:51)
[08:23:32]  copy finished in 5.93 s

Expected behavior:

No errors.

Steps to reproduce:

ionic cordova build android --prod

Related code:

_package.json_

{
    "name": "Tracker",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.4.4",
        "@angular/compiler": "4.4.4",
        "@angular/compiler-cli": "4.4.4",
        "@angular/core": "4.4.4",
        "@angular/forms": "4.4.4",
        "@angular/http": "4.4.4",
        "@angular/platform-browser": "4.4.4",
        "@angular/platform-browser-dynamic": "4.4.4",
        "@ionic-native/call-number": "^4.4.0",
        "@ionic-native/camera": "^4.3.2",
        "@ionic-native/contacts": "^4.3.3",
        "@ionic-native/core": "4.3.2",
        "@ionic-native/social-sharing": "^4.4.0",
        "@ionic-native/splash-screen": "4.3.2",
        "@ionic-native/status-bar": "4.3.2",
        "@ionic/storage": "2.0.1",
        "angular2-text-mask": "8.0.2",
        "call-number": "^1.0.1",
        "cordova-android": "^6.2.3",
        "cordova-plugin-camera": "^2.4.1",
        "cordova-plugin-compat": "^1.1.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-contacts": "^2.3.1",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-ionic-webview": "^1.1.16",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-plugin-x-socialsharing": "^5.2.1",
        "cordova-sqlite-storage": "^2.0.4",
        "es6-promise-plugin": "^4.1.0",
        "highcharts": "^6.0.2",
        "highcharts-more": "^0.1.2",
        "ionic-angular": "3.8.0",
        "ionic-img-viewer": "^2.7.3",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionic2-rating": "^1.2.2",
        "ionicons": "3.0.0",
        "moment": "^2.18.1",
        "ng2-truncate": "^1.3.11",
        "rxjs": "5.4.3",
        "sw-toolbox": "3.6.0",
        "text-mask-addons": "^3.6.0",
        "zone.js": "0.8.18",
        "mx.ferreyra.callnumber": "~0.0.2"
    },
    "devDependencies": {
        "@ionic/app-scripts": "3.0.1",
        "typescript": "2.3.4"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-sqlite-storage": {},
            "cordova-plugin-ionic-webview": {},
            "cordova-plugin-camera": {},
            "cordova-plugin-contacts": {},
            "cordova-plugin-x-socialsharing": {},
            "mx.ferreyra.callnumber": {}
        },
        "platforms": [
            "android"
        ]
    }
}

_Ionic info:_

cli packages: (C:\Users\lokuge\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.8.0

System:

    Android SDK Tools : 25.2.5
    Node              : v6.10.0
    npm               : 3.10.10
    OS                : Windows 8.1

Environment Variables:

    ANDROID_HOME : C:\Program Files (x86)\Android\android-sdk

Misc:

    backend : pro

Most helpful comment

# Option 1: update them via CLI, list all Ionic Native package names
# I think there's a shortcut if you're on mac/linux to upgrade the whole `@ionic-native` scope.
npm i --save @ionic-native/core@latest @ionic-native/camera@latest 

# Option 2:
# Edit package.json and bump all Ionic Native versions to 4.4.2
# Then run this in terminal:
npm update

All 7 comments

you have to change all ionic-native plugins version to 4.3.3

Sorry about that, I didn't realize that modules compiled with @angular/[email protected] are not compatible with @angular/*@4.x.x. Please downgrade your Ionic Native dependencies to version 4.3.3 for now, or upgrade your Angular version. Hopefully we'll have a better solution in the next release.

Ok sure. Thanks @ihadeed

Please upgrade your Ionic Native dependencies to 4.4.2

how do you upgrade Ionic native dependencies

# Option 1: update them via CLI, list all Ionic Native package names
# I think there's a shortcut if you're on mac/linux to upgrade the whole `@ionic-native` scope.
npm i --save @ionic-native/core@latest @ionic-native/camera@latest 

# Option 2:
# Edit package.json and bump all Ionic Native versions to 4.4.2
# Then run this in terminal:
npm update

thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kyleap picture kyleap  路  4Comments

JaneDawson picture JaneDawson  路  4Comments

mateo666 picture mateo666  路  3Comments

rajanshahsa picture rajanshahsa  路  3Comments

wwallace picture wwallace  路  4Comments