Search code examples
ionic3ionic-native

Version mismatch for module @ionic-native/dialogs


I get the following error

Error: Metadata version mismatch for module /www/projects/project/node_modules/@ionic-native/dialogs/index.d.ts, found version 4, expected 3 … when I run

$ ionic cordova build browser --prod It’s working when I build without --prod

Env. info

$ ionic info cli packages: (projects/project/node_modules)

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

global packages:

cordova (Cordova CLI) : 6.5.0 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : browser 4.1.0
Ionic Framework    : ionic-angular 3.6.0

System:

Node : v7.10.1
npm  : 4.2.0 
OS   : Linux 4.4

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

I need to publish new feature that uses Dialogs module by tomorrow so I would really appreciate any help…

thanks…


Solution

  • I installed @ionic-native/dialogs plugin and after that couldn't build my app for production anymore... Later I found out that npm installed the latest (incompatible) version of the plugin (4.4.0) but all other native plugins were at version 3.12.1... So I changed the new plugin version in the package.json file to 3.12.1 and installed it... This fixed my problem...