Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-9730

[cordova] failing to restore aerogear plugins

XMLWordPrintable

    • RC3
    • ER1
    • Service Team-Sprint 28
    • Hide

      Install latest version of cordova

      npm install -g cordova
      

      create a new cordova project

      cordova create test
      cd test/
      

      install an @aerogear cordova plugin:

      cordova plugin add @aerogear/cordova-plugin-aerogear-push
      cordova platform add android
      

      clean platforms/ and plugins/ directories

      rm -rf platforms/ plugins/
      

      and downloads plugin again:

      cordova prepare
      
      Show
      Install latest version of cordova npm install -g cordova create a new cordova project cordova create test cd test/ install an @aerogear cordova plugin: cordova plugin add @aerogear/cordova-plugin-aerogear-push cordova platform add android clean platforms/ and plugins/ directories rm -rf platforms/ plugins/ and downloads plugin again: cordova prepare
    • Hide

      There are a few solutions:

      • Downgrade to cordova@8
      • Manually add the plugin to the config.xml
      Show
      There are a few solutions: Downgrade to cordova@8 Manually add the plugin to the config.xml

      Executing cordova prepare after cleaning platforms/ and plugins/ dir fails with this error:

      Discovered platform "android@8.0.0" in config.xml or package.json. Adding it to the project
      Using cordova-fetch for cordova-android@8.0.0
      Adding android project...
      Creating Cordova project for the Android platform:
      	Path: platforms/android
      	Package: io.cordova.hellocordova
      	Name: HelloCordova
      	Activity: MainActivity
      	Android target: android-28
      Subproject Path: CordovaLib
      Subproject Path: app
      Android project created with cordova-android@8.0.0
      Discovered saved plugin "cordova-plugin-aerogear-push". Adding it to the project
      Failed to restore plugin "cordova-plugin-aerogear-push" from config.xml. You might need to try adding it again. Error: Error: npm: Command failed with exit code 1 Error output:
      npm ERR! code E404
      npm ERR! 404 'cordova-plugin-aerogear-push' is not in the npm registry.
      npm ERR! 404 You should bug the author to publish it
      npm ERR! 404 (or use the name yourself!)
      npm ERR! 404 
      npm ERR! 404 Note that you can also install from a
      npm ERR! 404 tarball, folder, http url, or git url.
      npm ERR! 404 
      npm ERR! 404  'cordova-plugin-aerogear-push@latest' is not in the npm registry.
      npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
      npm ERR! 404 
      npm ERR! 404 Note that you can also install from a
      npm ERR! 404 tarball, folder, http url, or git url.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/dbizzarr/.npm/_logs/2019-08-09T13_45_49_927Z-debug.log
      Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
      Installing "cordova-plugin-whitelist" for android
      

              danielpassos Daniel Passos (Inactive)
              dbizzarr@redhat.com Davide Bizzarri (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: