{"id":2367,"date":"2015-12-01T07:43:42","date_gmt":"2015-12-01T07:43:42","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=2367"},"modified":"2015-12-01T07:47:06","modified_gmt":"2015-12-01T07:47:06","slug":"ionic-plugin-add-phonegap-plugin-push-results-in-a-404-not-found-error","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/stack-overflow\/ionic-plugin-add-phonegap-plugin-push-results-in-a-404-not-found-error\/","title":{"rendered":"ionic plugin add phonegap-plugin-push results in a 404 Not Found Error"},"content":{"rendered":"<p><a href=\"http:\/\/stackoverflow.com\/users\/534755\/nikola\"><img loading=\"lazy\" decoding=\"async\" title=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" src=\"http:\/\/stackoverflow.com\/users\/flair\/534755.png\" rel=\"lightbox[2367]\" alt=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" width=\"208\" height=\"58\" \/><\/a><br \/>\nI&#8217;m a big fan of <a href=\"http:\/\/stackoverflow.com\/\">Stack Overflow<\/a> and I tend to contribute regularly (am currently in the <a href=\"http:\/\/stackexchange.com\/leagues\/1\/alltime\/stackoverflow\/2008-07-31\/534755?sort=reputationchange#534755\">top 0.X%<\/a>).\u00a0In this category (<a href=\"http:\/\/www.nikola-breznjak.com\/blog\/category\/stack-overflow\/\">stackoverflow<\/a>)\u00a0of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread <a href=\"http:\/\/meta.stackoverflow.com\/questions\/266971\/can-i-post-so-questions-and-answers-in-a-personal-blog\/266973\">here<\/a>.<\/p>\n<p>As you may know, I&#8217;m really into Ionic framework lately\u00a0and am helping out on StackOverflow with the knowledge I gained so far with the framework. I&#8217;m in the <a href=\"http:\/\/stackoverflow.com\/tags\/ionic\/topusers\">top All time answerers<\/a> list.<\/p>\n<p>I actually asked\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/32896700\/ionic-plugin-add-phonegap-plugin-push-results-in-a-404-not-found-error\">this question<\/a>\u00a0myself:<\/p>\n<p>I was following the official (and rather great) docs over at Ionic for <a href=\"http:\/\/docs.ionic.io\/v1.0\/docs\/push-from-scratch\" rel=\"nofollow\">how to get started with push notifications<\/a>.<\/p>\n<p>However, once the instructions said to install the phonegap-plugin-push plugin, I received the following error:<\/p>\n<pre class=\"lang:default decode:true\">nikola@Nikolas-Mini ~\/Desktop\/ionicTesting\/ionicPush\r\n&gt; ionic plugin add phonegap-plugin-push\r\nError: 404 Not Found: phonegap-plugin-push\r\nat RegClient.&lt;anonymous&gt; (\/usr\/local\/lib\/node_modules\/cordova\/node_modules\/cordova-lib\/node_modules\/npm\/node_modules\/npm-registry-client\/lib\/request.js:304:14)\r\nat 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)\r\nat Request.self.callback (\/usr\/local\/lib\/node_modules\/cordova\/node_modules\/cordova-lib\/node_modules\/npm\/node_modules\/request\/request.js:236:22)\r\nat Request.emit (events.js:110:17)\r\nat Request.&lt;anonymous&gt; (\/usr\/local\/lib\/node_modules\/cordova\/node_modules\/cordova-lib\/node_modules\/npm\/node_modules\/request\/request.js:1142:14)\r\nat Request.emit (events.js:129:20)\r\nat IncomingMessage.&lt;anonymous&gt; (\/usr\/local\/lib\/node_modules\/cordova\/node_modules\/cordova-lib\/node_modules\/npm\/node_modules\/request\/request.js:1096:12)\r\nat IncomingMessage.emit (events.js:129:20)\r\nat _stream_readable.js:908:16\r\nat process._tickCallback (node.js:355:11)<\/pre>\n<p>Anyone has an idea of why? I tried with <code>cordova<\/code> instead <code>ionic<\/code> but I get the same error.<\/p>\n<p>Also, I managed to find the answer myself:<\/p>\n<blockquote><p>After quite some searching I stumbled upon an <a href=\"http:\/\/cordova.apache.org\/announcements\/2015\/04\/21\/plugins-release-and-move-to-npm.html\" rel=\"nofollow\">official blog post<\/a>, Cordova is moving their plugins to npm.<\/p>\n<p>So, finally, I installed it easily now with npm:<\/p>\n<pre class=\"lang:default decode:true \">npm install phonegap-plugin-push<\/pre>\n<p>https:\/\/twitter.com\/HitmanHR\/status\/671596248764428289<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%).\u00a0In this category (stackoverflow)\u00a0of posts, I will be posting my&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1991,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,35],"tags":[],"class_list":["post-2367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ionic","category-stack-overflow"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=2367"}],"version-history":[{"count":4,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2367\/revisions"}],"predecessor-version":[{"id":2378,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2367\/revisions\/2378"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/1991"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=2367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=2367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=2367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}