What should I do when I see this dialog stating "Inconsistent plugins: plugins directory and project file mismatch"?
As the dialog says, this "mismatch" is usually due to one of the following conditions:
- A plugin was modified in your project directory by the XDK but the project file (that keeps track of all this stuff) did not get updated.
- Some agent outside of the control of the XDK modified a plugin file inside your project directory, so the XDK project file is "out-of-sync."
- Some files in the plugins directory inside of your project directory were moved or deleted.
There is one other thing that can cause this condition, which is not listed above:
- There is a mismatch between a plugin ID and that plugin's package ID.
This last one is caused by inconsistent naming of plugins that have been added to the new NPM package repo, where the Cordova project has asked plugin authors to place updates to their plugins. Read the last paragraph (below) to understand that issue more closely.
So... What should I do when I see this dialog stating "Inconsistent plugins: plugins directory and project file mismatch"?
In most cases, selecting the "Use Directory" option will do the right thing, because it will attempt to update the project file to match the contents of your plugins directory. This can, in some cases, result in a mismatch between your CLI version number and your core Cordova plugin versions. Such a mismatch is not a fatal problem, but can result in incompatibilities with some plugins. You can fix this version mismatch issue by changing the CLI version to make the XDK update your core plugin versions to match your CLI version (you may have to change the CLI version twice to make that update happen).
If you are using a plugin that has mismatched plugin and package IDs you will see this message every time you open your project. This is a known bug caused by bad plugin naming in the NPM registry and will be addressed in a future version of the XDK. The best thing to do, in this case, is to select "Use Directory" when you open your project. The plugins shown in the sample dialog box (above) are examples of this problem. Look very closely and you will see "dash names" on the left and "dot names" on the right; that is what a package ID and plugin ID mismatch looks like.
