离子插件添加phonegap-plugin-push结果导致404 Not Found错误 [英] ionic plugin add phonegap-plugin-push results in a 404 Not Found Error

查看:126
本文介绍了离子插件添加phonegap-plugin-push结果导致404 Not Found错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在Ionic上关注如何开始使用推送通知.

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

但是,一旦说明说要安装phonegap-plugin-push插件,我会收到以下错误消息:

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)

有人知道为什么吗?我尝试使用cordova而不是ionic,但是遇到相同的错误.

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

推荐答案

经过一番搜索,我偶然发现了

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

所以,最后,我现在使用npm轻松安装了它:

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

npm install phonegap-plugin-push

这篇关于离子插件添加phonegap-plugin-push结果导致404 Not Found错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆