Cordova error: Plugin "cordova-plugin-actionsheet" is not present in the project. See `cordova plugin list`


#1

Getting this error since upgrading to Meteor 1.6

meteor run android-device
or

meteor build

To confirm… the plugin is present… at least it is listed in .meteor/local/cordova-plugins

In case you are so interested… here’s the full error:

Preparing Cordova project from app bundle     
Processing mobile-config.js                   
Copying resources for mobile apps             
=> Started MongoDB.                           
Writing new config.xml                        
WARNING: Attempting to install plugin cordova-plugin-inappbrowser@1.3.0, but it should have a minimum version of 1.7.1 to ensure compatibility with the current platform versions.
         Installing the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-camera@2.1.1, but it should have a minimum version of 2.4.1 to ensure compatibility with the current platform versions. Installing the
         minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-device@0.3.0, but it should have a minimum version of 1.1.6 to ensure compatibility with the current platform versions. Installing the
         minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1, but it should have a minimum version of 2.2.3 to ensure compatibility with the current platform versions. Installing
         the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-splashscreen@4.0.1, but it should have a minimum version of 4.0.3 to ensure compatibility with the current platform versions.
         Installing the minimum version for convenience, but you should adjust your dependencies.
Removing plugins                              
cc.fovea.cordova.purchase,cordova-plugin-camera,cordova-plugin-compat,cordova-plugin-device,cordova-plugin-googleplus,cordova-plugin-inappbrowser,cordova-plugin-meteor-webapp,cordova-plugin-splashscreen,cordova-plugin-statusbar,cordova-plugin-tts,cordova-plugin-whitelist,cordova-plugin-wkwebview-engine,cordova-plugin-actionsheet
from Cordova project
%% No scripts found for hook "before_plugin_rm".
%% Calling plugman.uninstall on plugin "cc.fovea.cordova.purchase" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-camera" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-compat" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-device" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-googleplus" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-inappbrowser" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-meteor-webapp" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-splashscreen" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-statusbar" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-tts" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-whitelist" for platform "android"
%% Calling plugman.uninstall on plugin "cordova-plugin-wkwebview-engine" for platform "android"
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
%% Running command: /Users/robertross/dev/prototypes/wordlistBeta/.meteor/local/cordova-build/platforms/android/cordova/version 
=> Errors executing Cordova commands:         
                                              
   While removing plugins                     
   cc.fovea.cordova.purchase,cordova-plugin-camera,cordova-plugin-compat,cordova-plugin-device,cordova-plugin-googleplus,cordova-plugin-inappbrowser,cordova-plugin-meteor-webapp,cordova-plugin-splashscreen,cordova-plugin-statusbar,cordova-plugin-tts,cordova-plugin-whitelist,cordova-plugin-wkwebview-engine,cordova-plugin-actionsheet
   from Cordova project:
   Cordova error: Plugin "cordova-plugin-actionsheet" is not present in the project. See `cordova plugin list`.
   at
   /Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/plugin.js:286:45
   at Array.reduce (<anonymous>)
   at
   /Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/plugin.js:283:41
   at _fulfilled
   (/Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/q/q.js:787:54)
   at self.promiseDispatch.done
   (/Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/q/q.js:816:30)
   at Promise.promise.promiseDispatch
   (/Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/q/q.js:749:13)
   at
   /Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/q/q.js:509:49
   at flush
   (/Users/robertross/.meteor/packages/meteor-tool/.1.6.0.ln9n1++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/q/q.js:108:17)
   at _combinedTickCallback (internal/process/next_tick.js:131:7)
   at process._tickCallback (internal/process/next_tick.js:180:9)
   (If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again with the --verbose option to help diagnose the
   issue.)
                                              
/Users/robertross/.meteor/packages/coffeescript/.1.0.17.jfe0pt++os+web.browser+web.cordova/plugin.compileCoffeescript.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
      throw error;
      ^
ExitWithCode:1

Edit:

So… the impression i’m getting is that this issue is caused by some kind of dependancy management problem between versions of Meteor. And while maybe not a meteor issue itself, I think i must be missing some basic steps that should be taken when updating Meteor version.

I’m finding my issues lie with understanding how dependancy management works with certain packages, or groups of packages, or packages with their own dependancies.

For example…

Writing new config.xml                        
WARNING: Attempting to install plugin cordova-plugin-inappbrowser@1.3.0, but it should have a minimum version of 1.7.1 to ensure compatibility with the current platform versions.
         Installing the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-camera@2.1.1, but it should have a minimum version of 2.4.1 to ensure compatibility with the current platform versions. Installing the
         minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-device@0.3.0, but it should have a minimum version of 1.1.6 to ensure compatibility with the current platform versions. Installing the
         minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1, but it should have a minimum version of 2.2.3 to ensure compatibility with the current platform versions. Installing
         the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-splashscreen@4.0.1, but it should have a minimum version of 4.0.3 to ensure compatibility with the current platform versions.
         Installing the minimum version for convenience, but you should adjust your dependencies.
Removing plugins     

But i can’t find out how to actually adjust my dependencies…

I’m not even sure this is related to my issue above, just a hunch. Any help or things to try would be greatly appreciated


#3

I had this similar issue with a local Cordova project I was using, and turns out the problem was due to the configuration still remaining in the Cordova configuration, even though I had ran meteor remove cordova:myplugin

What I recommend is to remove the plugin and add it back to see if that fixes it (did for me)

First, remove it through meteor:
meteor remove cordova:cordova-plugin-actionsheet

Then, goto the .meteor/local/cordova-build/ directory, and run this command to list all cordova plugins:
cordova plugin list

If you see that one listed, run this command to remove it from Cordova:
cordova plugin rm cordova-plugin-actionsheet

Then go back to source directory:
I would then run your application to see if it works (to build once first before adding back), and then add it back to the project:

meteor add cordova:cordova-plugin-actionsheet