You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Crites (JIRA)" <ji...@apache.org> on 2017/11/17 14:55:01 UTC
[jira] [Updated] (CB-13589) Cordova fetch updates too aggressively
and breaks itself
[ https://issues.apache.org/jira/browse/CB-13589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Crites updated CB-13589:
-------------------------------
Description:
Related: CB-11252 CB-12262 -- these issues say they are fixed, but I can still reproduce them.
Running {{cordova platform add}} with plugins directly from github or a file system path will update {{package.json}} in a way that subsequently breaks the plugin installation. To get around this, you must currently use {{cordova platform add $PLATFORM --nofetch}}.
For example:
{code}
<plugin name="cordova-plugin-apprate" spec="https://github.com/pushandplay/cordova-plugin-apprate#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9" />
<plugin name="phonegap-plugin-push" spec="./src/local-plugins/phonegap-plugin-push">
<variable name="SENDER_ID" value="$SENDER_ID" />
</plugin>
{code}
On an initial {{cordova platform add}} this will work fine. However, this updates {{package.json}} to add these plugins as dependencies:
{code}
+ "cordova-plugin-apprate": "git+https://github.com/pushandplay/cordova-plugin-apprate.git#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9",
+ "phonegap-plugin-push": "file:src/local-plugins/phonegap-plugin-push",
{code}
Now try:
{code}
rm -rf node_modules platforms plugins
npx npm@5.4.2 install
npx cordova@7.1.0 platform add ios
{code}
for example. Plugin installation will be unsuccessful:
{code}
Failed to restore plugin "phonegap-plugin-push" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:src/local-plugins/phonegap-plugin-push via registry.
Failed to restore plugin "cordova-plugin-apprate" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/pushandplay/cordova-plugin-apprate.git#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9 via registry.
{code}
Manually removing the {{package.json}} update ({{\--nosave}} is broken CB-13463) or using {{--nofetch}} will work.
was:
Related: CB-11252 CB-12262 -- these issues say they are fixed, but I can still reproduce them.
Running {{cordova platform add}} with plugins directly from github or a file system path will update {{package.json}} in a way that subsequently breaks the plugin installation. To get around this, you must currently use {{cordova platform add $PLATFORM --nofetch}}.
For example:
{code}
<plugin name="cordova-plugin-apprate" spec="https://github.com/pushandplay/cordova-plugin-apprate#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9" />
<plugin name="phonegap-plugin-push" spec="./src/local-plugins/phonegap-plugin-push">
<variable name="SENDER_ID" value="$SENDER_ID" />
</plugin>
{code}
On an initial {{cordova platform add}} this will work fine. However, this updates {{package.json}} to add these plugins as dependencies:
{code}
+ "cordova-plugin-apprate": "git+https://github.com/pushandplay/cordova-plugin-apprate.git#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9",
+ "phonegap-plugin-push": "file:src/local-plugins/phonegap-plugin-push",
{code}
Now try:
{code}
rm -rf node_modules platforms plugins
npx npm@5.4.2 install
npx cordova@7.1.0 platform add ios
{code}
for example. Plugin installation will be unsuccessful:
{code}
Failed to restore plugin "phonegap-plugin-push" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:src/local-plugins/phonegap-plugin-push via registry.
Failed to restore plugin "cordova-plugin-apprate" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/pushandplay/cordova-plugin-apprate.git#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9 via registry.
{code}
Manually removing the {{package.json}} update ({{--nosave}} is broken CB-13463) or using {{--nofetch}} will work.
> Cordova fetch updates too aggressively and breaks itself
> --------------------------------------------------------
>
> Key: CB-13589
> URL: https://issues.apache.org/jira/browse/CB-13589
> Project: Apache Cordova
> Issue Type: Bug
> Reporter: Andrew Crites
> Priority: Blocker
>
> Related: CB-11252 CB-12262 -- these issues say they are fixed, but I can still reproduce them.
> Running {{cordova platform add}} with plugins directly from github or a file system path will update {{package.json}} in a way that subsequently breaks the plugin installation. To get around this, you must currently use {{cordova platform add $PLATFORM --nofetch}}.
> For example:
> {code}
> <plugin name="cordova-plugin-apprate" spec="https://github.com/pushandplay/cordova-plugin-apprate#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9" />
> <plugin name="phonegap-plugin-push" spec="./src/local-plugins/phonegap-plugin-push">
> <variable name="SENDER_ID" value="$SENDER_ID" />
> </plugin>
> {code}
> On an initial {{cordova platform add}} this will work fine. However, this updates {{package.json}} to add these plugins as dependencies:
> {code}
> + "cordova-plugin-apprate": "git+https://github.com/pushandplay/cordova-plugin-apprate.git#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9",
> + "phonegap-plugin-push": "file:src/local-plugins/phonegap-plugin-push",
> {code}
> Now try:
> {code}
> rm -rf node_modules platforms plugins
> npx npm@5.4.2 install
> npx cordova@7.1.0 platform add ios
> {code}
> for example. Plugin installation will be unsuccessful:
> {code}
> Failed to restore plugin "phonegap-plugin-push" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:src/local-plugins/phonegap-plugin-push via registry.
> Failed to restore plugin "cordova-plugin-apprate" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/pushandplay/cordova-plugin-apprate.git#0cc8b3b424491d35b1e571a69b21d2ae7cb9cff9 via registry.
> {code}
> Manually removing the {{package.json}} update ({{\--nosave}} is broken CB-13463) or using {{--nofetch}} will work.
--
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