@ionic-native/file-transfer/index.d.ts, found version 4, expected 3

same issue:
I tried multiple things can someone help?
thx

“dependencies”: {
"@angular/common": “~4.1.3”,
"@angular/compiler": “~4.1.3”,
"@angular/compiler-cli": “~4.1.3”,
"@angular/core": “~4.1.3”,
"@angular/forms": “~4.1.3”,
"@angular/http": “~4.1.3”,
"@angular/platform-browser": “~4.1.3”,
"@angular/platform-browser-dynamic": “~4.1.3”,
"@angular/platform-server": “~4.1.3”,
"@ionic-native/app-version": “^4.3.2”,
"@ionic-native/camera": “^4.2.1”,
"@ionic-native/code-push": “^4.1.0”,
"@ionic-native/core": “^4.1.0”,
"@ionic-native/device": “^4.1.0”,
"@ionic-native/file": “^4.1.0”,
"@ionic-native/file-transfer": “^4.1.0”,
"@ionic-native/keyboard": “^4.1.0”,
"@ionic-native/local-notifications": “^4.1.0”,
"@ionic-native/onesignal": “^4.3.2”,
"@ionic-native/splash-screen": “^4.1.0”,
"@ionic-native/status-bar": “^4.1.0”,
"@ionic/storage": “~2.0.1”,
"@ngx-translate/core": “^7.1.0”,
"@ngx-translate/http-loader": “^0.1.0”,
"@types/autolinker": “^0.24.28”,
"@types/query-string": “~4.3.1”,
“android-versions”: “^1.2.1”,
“angular2-moment”: “^1.6.0”,
“autolinker”: “~1.4.3”,
“blueimp-canvas-to-blob”: “^3.14.0”,
“code-push”: “^2.0.2-beta”,
“cordova-android”: “^6.2.3”,
“cordova-ios”: “^4.4.0”,
“cordova-plugin-app-event”: “^1.2.1”,
“cordova-plugin-app-version”: “^0.1.9”,
“cordova-plugin-camera”: “^2.4.1”,
“cordova-plugin-cocoapod-support”: “^1.3.0”,
“cordova-plugin-code-push”: “^1.9.5-beta”,
“cordova-plugin-compat”: “^1.2.0”,
“cordova-plugin-console”: “^1.1.0”,
“cordova-plugin-device”: “^1.1.6”,
“cordova-plugin-dialogs”: “^1.3.3”,
“cordova-plugin-file”: “^4.3.3”,
“cordova-plugin-file-transfer”: “^1.6.3”,
“cordova-plugin-ionic-webview”: “^1.1.16”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.3”,
“cordova-plugin-whitelist”: “^1.3.2”,
“cordova-plugin-zip”: “^3.1.0”,
“cordova-sqlite-storage”: “^2.0.4”,
“de.appplant.cordova.plugin.local-notification”: “^0.8.5”,
“diacritics”: “~1.3.0”,
“firebase”: “^4.2.0”,
“ionic-angular”: “^3.6.1”,
“ionic-gallery-modal”: “^0.2.2”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“moment”: “~2.18.0”,
“ng-elastic”: “~1.0.0-beta.3”,
“ng2-img-max”: “^2.1.5”,
“onesignal-cordova-plugin”: “^2.2.2”,
“promise-polyfill”: “~6.0.2”,
“query-string”: “^5.0.0”,
“rxjs”: “^5.4.2”,
“sw-toolbox”: “~3.6.0”,
“zone.js”: “^0.8.16”
},
“devDependencies”: {
"@ionic/app-scripts": “^2.1.4”,
"@ionic/cli-plugin-cordova": “^1.6.2”,
"@ionic/cli-plugin-ionic-angular": “^1.4.1”,
"@types/jasmine": “~2.5.53”,
"@types/request": “^2.0.0”,
“code-push-cli”: “^2.0.2-beta”,
“cordova-check-plugins”: “~3.0.1”,
“cross-env”: “^5.0.4”,
“firebase-admin”: “^5.1.0”,
“fs-extra”: “^4.0.1”,
“ionic”: “3.12.0”,
“node-sass”: “~4.5.3”,
“shortid”: “~2.2.8”,
“shx”: “~0.2.2”,
“typescript”: “^2.4.2”,
“webpack-bundle-analyzer”: “^2.8.3”,
“webpack-merge”: “^4.1.0”
},

Thanks, upgrading core solved the problem

@Shrakka I am also facing the same issue. Let me know how to upgrade core?

npm install @ionic-native/core --save

@vks_gautam1 Thanks for your quick response

I have upgraded the core, but still facing the same issue “node_modules/@ionic-native/camera/index.d.ts, found version 4, expected 3”. Somebody please help me.

My package.json

"dependencies": {
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/camera": "^4.4.0",
    "@ionic-native/core": "^4.3.2",
    "@ionic-native/facebook": "^4.3.2",
    "@ionic-native/fcm": "^4.3.3",
    "@ionic-native/file": "^4.3.2",
    "@ionic-native/file-path": "^4.3.2",
    "@ionic-native/google-plus": "^4.3.2",
    "@ionic-native/in-app-browser": "^4.3.3",
    "@ionic-native/native-storage": "^4.3.2",
    "@ionic-native/network": "^4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic-native/toast": "^4.3.2",
    "@ionic-native/transfer": "^3.14.0",
    "@ionic/storage": "2.0.1",
    "cordova-android": "^6.2.3",
    "cordova-ios": "^4.4.0",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-facebook4": "^1.9.1",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-file": "^4.3.3",
    "cordova-plugin-file-transfer": "^1.6.3",
    "cordova-plugin-filepath": "^1.1.0",
    "cordova-plugin-googleplus": "^5.1.1",
    "cordova-plugin-inappbrowser": "^1.7.1",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-nativestorage": "^2.2.2",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-whitelist": "^1.3.1",
    "cordova-plugin-x-toast": "^2.6.0",
    "ionic-angular": "3.7.1",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
"@ionic-native/transfer": "^3.14.0",

update it

@vks_gautam1 I already have this

@ionic-native/transfer”: “^3.14.0”,

your app script is having clash with you camera

@ionic/app-scripts”: “3.0.1”

What is the solution for it? There is no issue with iOS dev build, the problem is only with prod build.

you could update to it. but it could break your project. update cli and app script

Okay, thanks. I will try for the solution.

I have the same issue if i compile in ios --prod mode, i don’t have idea

  "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/call-number": "^3.12.1",
    "@ionic-native/core": "3.7.0",
    "@ionic-native/email-composer": "^3.10.3",
    "@ionic-native/google-maps": "^3.10.3",
    "@ionic-native/in-app-browser": "^3.14.0",
    "@ionic-native/network": "^4.0.1",
    "@ionic-native/splash-screen": "^3.7.0",
    "@ionic-native/status-bar": "3.7.0",
    "@ionic/storage": "^2.0.1",
    "@types/jquery": "^3.2.13",
    "call-number": "^1.0.1",
    "chart.js": "^2.6.0",
    "cordova-android": "^6.2.3",
    "cordova-custom-config": "^3.3.0",
    "cordova-ios": "^4.4.0",
    "cordova-plugin-console": "^1.0.5",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-email-composer": "git+https://github.com/katzer/cordova-plugin-email-composer.git",
    "cordova-plugin-googlemaps": "^1.4.0",
    "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",
    "cordova-plugin-inappbrowser": "~1.7.1",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.2",
    "cordova-plugin-whitelist": "^1.3.1",
    "cordova-windows": "^5.0.0",
    "ionic-angular": "3.3.0",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "jquery": "^3.2.1",
    "mx.ferreyra.callnumber": "~0.0.2",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.10",
    "cordova-plugin-themeablebrowser": "^0.2.17"
  },

Remove the caret (^) from your package versions of @ionic-native.

    "@ionic-native/contacts": "4.3.3",
    "@ionic-native/core": "4.3.3",
    "@ionic-native/device": "4.3.3",
    "@ionic-native/diagnostic": "4.3.3",
    "@ionic-native/fcm": "4.3.3",
    "@ionic-native/file-chooser": "4.3.3",
    "@ionic-native/file-path": "4.2.1",
    "@ionic-native/in-app-browser": "4.3.3",

Reason:

The caret, on the other hand, is more relaxed. It will update you to the most recent major version (the first number). ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0.

From this StackOverflow question

1 Like

To confirm post above, this worked for me:
2017-11-14_18-48-53

How you avoid the error from the call-number plugin?

Always return me an npm error and cancel the npm install… This is so frustrating

hey, Thanks it working for me
when downgrade native plugin version :smiley:

Remove the caret ‘^’ and change all your @ionic-native/plugins to version 4.3.3

    "@ionic-native/contacts": "4.3.3",
    "@ionic-native/core": "4.3.3",
    "@ionic-native/device": "4.3.3",
    "@ionic-native/diagnostic": "4.3.3",
    "@ionic-native/fcm": "4.3.3",
    "@ionic-native/file-chooser": "4.3.3",
    "@ionic-native/file-path": "4.3.3",
    "@ionic-native/in-app-browser": "4.3.3",

Then run npm install.

1 Like

Finally it works! thanks

Make sure all your ionic-native components are the right version. I found that I had to:

rm -r node_modules
rm package-lock.json

Then reinstall each ionic-native component using for example

ionic cordova plugin add --save @ionic-native/code

to make sure it was the right version. then it all compiled for me correctly:

ionic cordova build ios --release --prod.

My package.json looks like:

  "dependencies": {
    "@angular/common": "^5.0.1",
    "@angular/compiler": "^5.0.1",
    "@angular/compiler-cli": "^5.0.1",
    "@angular/core": "^5.0.1",
    "@angular/forms": "^5.0.1",
    "@angular/http": "^5.0.1",
    "@angular/platform-browser": "^5.0.1",
    "@angular/platform-browser-dynamic": "^5.0.1",
    "@ionic-native/app-version": "^4.4.0",
    "@ionic-native/badge": "^4.4.0",
    "@ionic-native/barcode-scanner": "^4.4.0",
    "@ionic-native/camera": "^4.4.0",
    "@ionic-native/core": "^4.4.0",
    "@ionic-native/device": "^4.4.0",
    "@ionic-native/facebook": "^4.4.0",
    "@ionic-native/firebase-analytics": "^4.4.0",
    "@ionic-native/geolocation": "^4.4.0",
    "@ionic-native/google-plus": "^4.4.0",
    "@ionic-native/image-picker": "^4.4.0",
    "@ionic-native/local-notifications": "^4.4.0",
    "@ionic-native/network": "^4.4.0",
    "@ionic-native/onesignal": "^4.4.0",
    "@ionic-native/photo-viewer": "^4.4.0",
    "@ionic-native/splash-screen": "^4.4.0",
    "@ionic-native/status-bar": "^4.4.0",
    "@ionic/storage": "^2.1.3",
    "@ngx-translate/core": "^8.0.0",
    "@ngx-translate/http-loader": "^0.1.0",
    "@types/google-maps": "^3.2.0",
    "@types/googlemaps": "^3.26.20",
    "ajv": "^5.2.2",
    "chart.js": "^2.7.0",
    "com-sarriaroman-photoviewer": "^1.1.10",
    "com.synconset.imagepicker": "~2.1.8",
    "cordova-android": "^6.4.0",
    "cordova-android-play-services-gradle-release": "^1.1.3",
    "cordova-ios": "^4.5.3",
    "cordova-plugin-app-version": "^0.1.9",
    "cordova-plugin-badge": "^0.8.1",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-device": "^1.1.6",
    "cordova-plugin-facebook4": "^1.9.1",
    "cordova-plugin-firebase-analytics": "^0.11.0",
    "cordova-plugin-geolocation": "^2.4.3",
    "cordova-plugin-googleplus": "^5.1.1",
    "cordova-plugin-image-picker": "^1.1.3",
    "cordova-plugin-ionic-webview": "^1.1.14",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.3",
    "cordova-plugin-telerik-imagepicker": "^2.1.8",
    "cordova-plugin-whitelist": "^1.3.2",
    "cordova-sqlite-storage": "^2.0.4",
    "cordova-support-google-services": "^1.0.0",
    "de.appplant.cordova.plugin.local-notification": "^0.8.5",
    "ionic-angular": "^3.7.0",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "^3.0.0",
    "moment": "^2.18.1",
    "phonegap-plugin-barcodescanner": "^6.0.8",
    "rxjs": "^5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "^0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^3.1.2",
    "ionic": "^3.18.0",
    "typescript": "^2.5.2"
  }