vbotio
vbotio

Reputation: 1674

Error deleting cordova plugin

I am trying just to delete a plugin from my cordova project. It should be simple but I don't know why its having an error.

cordova plugin list

shows me this:

cordova-plugin-customurlscheme 4.0.0 "Custom URL scheme"

cordova-plugin-dialogs 1.1.1 "Notification"

cordova-plugin-file 3.0.1-dev "File"

cordova-plugin-file-transfer 1.2.2-dev "File Transfer"

and when I run

cordova plugin rm cordova-plugin-customurlscheme

it shows me :

SyntaxError: Unexpected token /
at Object.parse (native)
at Function.PlatformJson.load (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/PlatformJson.js:35:21)
at runUninstallPlatform (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/uninstall.js:233:37)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/uninstall.js:94:16
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)

What this could be ?

Upvotes: 0

Views: 542

Answers (1)

Martin
Martin

Reputation: 122

This can happen when the plugin itself was not coded properly. Try delete the following:

\plugins\cordova-plugin-customurlscheme (or whatever the folder name)

reference to it in \plugins\fetch.json and \plugins\android.json (or ios)

\www\plugins\cordova-plugin-customurlscheme

(the reference in this file) \www\plugins\cordova_plugins.js

If that doesn't work. Just recreate the whole app and add the other plugins back in, and then add the source code back in.

Upvotes: 1

Related Questions