2

I was following the official (and rather great) docs over at Ionic for how to get started with push notifications.

However, once the instructions said to install the phonegap-plugin-push plugin, I received the following error:

nikola@Nikolas-Mini ~/Desktop/ionicTesting/ionicPush
> ionic plugin add phonegap-plugin-push
Error: 404 Not Found: phonegap-plugin-push
at RegClient.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:14)
at Request._callback (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
at Request.self.callback (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/request.js:236:22)
at Request.emit (events.js:110:17)
at Request.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/request.js:1142:14)
at Request.emit (events.js:129:20)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/request.js:1096:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)

Anyone has an idea of why? I tried with cordova instead ionic but I get the same error.

Nikola
  • 14,888
  • 21
  • 101
  • 165

1 Answers1

6

After quite some searching I stumbled upon an official blog post, Cordova is moving their plugins to npm.

So, finally, I installed it easily now with npm:

npm install phonegap-plugin-push
Nikola
  • 14,888
  • 21
  • 101
  • 165
  • I think it should be `cordova plugin add phonegap-plugin-push` – A1rPun Nov 30 '15 at 14:41
  • Hmm, not quite sure as it could be due to temporary network error as well. You can try clearing the cache with `npm cache clean` (take a look at this question, it may help: http://stackoverflow.com/questions/31547789/why-am-i-getting-unexpected-token-u0000-when-using-npm-install-g-package/31635673) – Nikola Feb 25 '16 at 06:09
  • It appears to successfully install phone-gap-plugin, returning `phonegap-plugin-push@1.5.3 node_modules/phonegap-plugin-push`--but if try to `ionic emulate` I still get the phonegap plugin error--specifically https://github.com/driftyco/ionic-platform-issues/issues/37. Totally stumped. – metalaureate Feb 25 '16 at 14:17