You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/27 23:55:40 UTC
[GitHub] [cordova] davidofwatkins opened a new issue #89: Cordova 9 Does Not
Remember Plugins
davidofwatkins opened a new issue #89: Cordova 9 Does Not Remember Plugins
URL: https://github.com/apache/cordova/issues/89
# Bug Report
## Problem
Cordova 9 is not automatically installing plugins from `package.json` when I add a platform with `cordova platform add`. This used to work on Cordova 8. (See steps to reproduce below.)
### What is expected to happen?
Assuming a fresh environment (i.e., no `platforms` or `plugins` directories), Cordova 9 should install plugins from `package.json` when adding a platform.
### What does actually happen?
Cordova 9 adds platforms without any of the plugins listed in `package.json` installed.
## Further Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
After running `cordova plugin add`, plugins are only added to `package.json`, not `config.xml`. If I manually add a plugin to `config.xml`, `cordova platform add` does include it in the platform, but because `cordova plugin add` only updates `package.json`, there's no expectation that plugins should be declared in `config.xml`.
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
I'm able to prove this by creating a fresh Cordova 9 project as follows:
```sh
# initialize a new Cordova project
npm i -g cordova@9
cordova create cordova-test
cd cordova-test
# start off with an empty platform
cordova platform add android
# install a plugin
cordova plugin add cordova-plugin-camera
# show that it's installed
cordova plugin ls
# this succeeds and produces:
# cordova-plugin-camera 4.0.3 "Camera"
# cordova-plugin-whitelist 1.3.3 "Whitelist"
# clear out the platforms and plugins directories, which are not
# normally checked into version control
rm -rf platforms/ plugins/
# add the platform again
cordova platform add android
# cordova-plugin-camera will not be re-installed,
# even though it has been added to package.json
cordova plugin ls
```
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
- MacoS 10.14.13 Mojave
- Any Cordova platform
### Version information
<!-- What are relevant versions you are using? -->
- Cordova: 9.0.0
- Cordova Platforms: any (tested with `cordova-android@8.0.0` and 7.x)
- Cordova Plugins: any (tested with several)
- Node: 10.15.0
- NPM: 6.7.0
- MacOS: 10.14.3 Mojave
## 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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org