You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Spence DiNicolantonio (JIRA)" <ji...@apache.org> on 2017/07/02 14:48:00 UTC

[jira] [Created] (CB-12977) Cordova 7 breaks npm install if any declared plugin doesn't contain package.json

Spence DiNicolantonio created CB-12977:
------------------------------------------

             Summary: Cordova 7 breaks npm install if any declared plugin doesn't contain package.json
                 Key: CB-12977
                 URL: https://issues.apache.org/jira/browse/CB-12977
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-cli, cordova-plugins
    Affects Versions: cordova@7.0.0
         Environment: OSX 10.12.15, npm 3.10.10, Cordova 7.0.1
            Reporter: Spence DiNicolantonio


As of Cordova 7, plugins declared in config.xml are automatically added to dependencies in _package.json_ on prepare. This limits Cordova 7 projects to plugins that are also node packages, as the {{npm install}} process will break if any declared dependency does not contain a valid _package.json_ ([see related npm error|https://github.com/npm/npm/issues/7232]).

Quite a few functioning Cordova plugins (e.g. [CordovaClipboard|https://github.com/VersoSolutions/CordovaClipboard], [PrivacyScreen|https://github.com/Telerik-Verified-Plugins/PrivacyScreen]) live on GitHub and don't contain a _package.json_. In order to use such plugins in conjunction with Cordova 7 without breaking `npm install`, we must omit the plugin declarations from config.xml and commit the contents of the _/plugins_ directory. 

To be clear, this is not a malfunction of the Cordova CLI. Rather, this is a side-effect of the automated mirroring of _config.xml_ and _package.json_ configuration in Cordova 7.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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