You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/08/19 10:57:48 UTC

[GitHub] [cordova-lib] Offpics opened a new issue #850: Unable to remove a plugin using a not officialy supported platform

Offpics opened a new issue #850:
URL: https://github.com/apache/cordova-lib/issues/850


   # Bug Report
   
   ## Problem
   I am unable to remove a custom plugin using `cordova plugin remove plugin-name` for not officially supported platform.
   
   ### What is expected to happen?
   The plugin should be removed from the project.
   
   
   ### What does actually happen?
   CLI throws an error: `Platform "platform-name" not supported.`.
   
   
   ## Information
   Looking at source code, the `plugin remove` command calls function `uninstallPlatform` in `cordova-lib/src/plugman/uninstall.js`. The error I get comes from https://github.com/apache/cordova-lib/blob/1d98b57a1bc51d74217198681c506a608c8396db/src/plugman/uninstall.js#L70-L72
   
   `platform_modules` are defined inside https://github.com/apache/cordova-lib/blob/master/src/platforms/platformsConfig.json. It makes sense it's not modified when I add the custom platform to the project. 
   This part of the code probably should not depend on the static configuration.
   
   
   
   ### Command or Code
   ```
   cordova plugin remove plugin-name --verbose
   Calling plugman.uninstall on plugin "plugin-name" for platform "platform-name"
   Platform "platform-name" not supported.
   CordovaError: Platform "platform-name" not supported.
       at Function.module.exports.uninstallPlatform (...\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\uninstall.js:71:31)
       at ...\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\plugin\remove.js:106:38
       at process._tickCallback (internal/process/next_tick.js:68:7)
       at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
       at startup (internal/bootstrap/node.js:283:19)
       at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
   ```
   
   ### Version information
   Cordova: 10.0.0
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-lib] brodybits commented on issue #850: Unable to remove a plugin using a not officially supported platform

Posted by GitBox <gi...@apache.org>.
brodybits commented on issue #850:
URL: https://github.com/apache/cordova-lib/issues/850#issuecomment-676287315


   Thanks, this definitely needs investigation. A PR with proper test cases would be welcome.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org