Error: Failed to fetch plugin onesignal-cordova-plugin via registry

Hi,

I can’t download a plugin, for every plugin im getting this message:

sudo ionic cordova plugin add onesignal-cordova-plugin --save --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/home/thijmen/Desktop/abk', local: true, binPath: '/usr/local/lib/node_modules/ionic/bin/ionic', 
        libPath: '/home/thijmen/Desktop/abk/node_modules/ionic/dist/index.js' }
> cordova plugin add onesignal-cordova-plugin --save
✖ Running command - failed!
[ERROR] An error occurred while running cordova plugin add onesignal-cordova-plugin --save (exit code 1):

        
        Error: Failed to fetch plugin onesignal-cordova-plugin via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.
        Error: npm: Command failed with exit code 1 Error output:
        npm ERR! Linux 4.10.0-35-generic
        npm ERR! argv "/usr/local/bin/node" "/home/thijmen/Desktop/abk/node_modules/.bin/npm" "install" 
        "onesignal-cordova-plugin" "--production" "--save"
        npm ERR! node v6.11.4
        npm ERR! npm  v2.15.12
        npm ERR! code EPEERINVALID
        
        npm ERR! peerinvalid The package zone.js@0.8.10 does not satisfy its siblings' peerDependencies requirements!
        npm ERR! peerinvalid Peer @angular/core@2.4.10 wants zone.js@^0.7.2
        
        npm ERR! Please include the following file with any support request:
        npm ERR!     /home/thijmen/Desktop/abk/npm-debug.log

My ionic info is the following:

cli packages: (/home/thijmen/Desktop/abk/node_modules)

    @ionic/cli-utils  : 1.13.0
    ionic (Ionic CLI) : 3.13.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.3.0

System:

    Node : v6.11.4
    npm  : 2.15.12 
    OS   : Linux 4.10

Misc:

    backend : pro

Thanks in advance

I think it’s something with this following things:

npm ERR! peerinvalid The package zone.js@0.8.10 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/core@2.4.10 wants zone.js@^0.7.2

Only don’t know how to solve this problem.

Bump, it’s an important issue for me.
Can some one check if he got a solution?

Just tried creating a blank ionic app and adding the plugin just fine.
Try with a blank app.

Already tried, Iknow it’s working. But i’ve to integrate it in my app and not in a blank project.

Couple of things to try…

Upgrade your node / npm (you could do that anyway).

Remove the node_modules directory, then run npm install and attempt your plugin again.

Should try it one more time.
Tried that a few hours ago, maybe I made a mistake while updating.

I will keep you in touch.

Any luck with it? I have been having this issue since yesterday and cannot seem to find a solution.

No doesn’t work.
Still no solution for this indeed.

1 Like

You can share your repo if you like - but I won’t beg

I can’t share my repo sadly…

Then good luck with it

If it means anything, I have been having success with removing the “node_modules” folder and then adding each plugin manually in the command window. (pretty much like Judgewest2000 suggested)

Although, time from time, a plugin would give me that error. Simply removing “node_modules” once more seemed to allow me to re-attempt and successfully install the plugin.

I don’t know if this will work in automation or not, but at least it is a start!