Opinions about migrating from v3 to v4


2 years ago I created an app using Ionic 3 and now I’d love to update it to Ionic 4, my project uses lots of libraries and especially lots of Cordova plugins which, from my understanding, aren’t a thing anymore in Ionic 4.

I am worried the migration process is just too much for this project and I’m writing this post because I’d love to hear your opinion before starting to work on it. Is this migration doable given the following list of dependencies my project uses?

List of dependencies:

  "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/base64": "^4.12.0",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/date-picker": "^4.12.0",
    "@ionic-native/file": "^4.12.0",
    "@ionic-native/file-opener": "^4.12.0",
    "@ionic-native/file-transfer": "^4.12.0",
    "@ionic-native/photo-viewer": "^4.12.0",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic/storage": "^2.1.3",
    "com-badrit-base64": "^0.2.0",
    "com-sarriaroman-photoviewer": "^1.1.18",
    "cordova-android": "7.0.0",
    "cordova-browser": "5.0.4",
    "cordova-plugin-datepicker": "^0.9.3",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-ionic-keyboard": "^2.1.2",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-save-image": "^0.3.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-wallpaper": "^0.1.1",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.4.0",
    "ionic-angular": "3.9.2",
    "ionic-cache": "^3.1.2",
    "ionic-image-loader": "^5.0.5",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "2.4.2"
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "com-sarriaroman-photoviewer": {},
      "cordova-plugin-datepicker": {},
      "cordova-plugin-file": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-save-image": {},
      "cordova-plugin-wallpaper": {},
      "com-badrit-base64": {}

If needed or if someone is curious I can share the app source code as it’s opensource, here’s the Github repository.

And again. feel free to be brutally honest with me!

I’m using node v12.18.0 and managed to get it to work after running the following 2 commands:

npm install @ionic/app-scripts@latest --save-dev
npm audit fix --force

There is no change with plugins. There are updates to Ionic Native (the interface between Typescript and the plugin). I think the migration won’t be too bad. Changes to the theming probably will be the biggest effort.

Good Luck, and let us know how it goes!

I gave up… i can’t really figure out how to migrate everything, especially the theming and routing. I wish better documentation was available.

Edit: also today i’m noticing lots of problems with really a lot of libraries that don’t work anymore for Ionic 4, let alone Ionic 5. I believe replacing them with alternatives would take the same effort as a rewrite!

1 Like