Reputation: 77
I'm trying to add this plugin https://github.com/MobileAppTracking/phonegap-plugin but when I run the command I see this error:
Error during processing of action! Attempting to revert...
Failed to install 'com.mobileapptracking.matplugin':TypeError: Uh oh!
Arguments to path.resolve must be strings
at Object.exports.resolve (path.js:313:15)
at module.exports.framework.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:106:31)
at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:70:25)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:567:20)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:322:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
TypeError: Uh oh!
Arguments to path.resolve must be strings
at Object.exports.resolve (path.js:313:15)
at module.exports.framework.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:106:31)
at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:70:25)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:567:20)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:322:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
My node version is v0.10.25
My npm version is 1.3.10
My cordova version is 3.6.3-0.2.13
Upvotes: 1
Views: 4855
Reputation: 6063
You should update your Cordova version and update your android platform or remove it totally and then add it once again.
Please Update Cordova :
sudo npm update -g cordova
please remove your android platform by using following command
cordova platform rm android
And then add platform using following command
cordova platform add android
Hopes this will help you !
Upvotes: 0
Reputation: 3422
You should update your Cordova version and cordova-android, remove the plugin and clean its installed dependencies, to have then a new clean install of the plugin
Update Cordova :
sudo npm update -g cordova
Update android Platform
cordova platform update android
In your case, it seems that you should remove the plugin
cordova plugin remove com.mobileapptracking.matplugin
Remove manually Play Services dependency in your directories and
in android.json
file
Then reinstall the plugin
cordova plugin add https://github.com/MobileAppTracking/phonegap-plugin
Upvotes: 9