ionic-2原生youtube视频播放器插件无法安装?Cordova错误:无法获取插件? [英] ionic-2 native youtube video player plugin failed to install?Cordova Error: Failed to fetch plugin?

查看:433
本文介绍了ionic-2原生youtube视频播放器插件无法安装?Cordova错误:无法获取插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您正在构建一个离子2应用程序,它显示了一些管视频内容,我研究了离子原生文档 https://ionicframework.com/docs/native/youtube-video-player/

hi i am building an ionic-2 app which shows some you tube videos content, i researched on the ionic native docs https://ionicframework.com/docs/native/youtube-video-player/

这个插件

`ionic cordova plugin add https://github.com/JonSmart/CordovaYoutubeVideoPlayer`

我在控制台上收到错误

Error: Failed to fetch plugin https://github.com/JonSmart/CordovaYoutubeVideoPlayer via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install C:\Users\***\AppData\Local\Temp\npm-1048-6f63d401\git-cache-cc20a6f9\2a0cc8f3790b584ed1aae3927d03f7213e90c9d0
npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\***\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "https://github.com/JonSmart/CordovaYoutubeVideoPlayer" "--save"
npm ERR! node v4.5.0
npm ERR! npm  v3.9.0
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

我也在这里点击了git hub链接 https://github.com/JonSmart/CordovaYoutubeVideoPlayer

i also refereed git hub link here https://github.com/JonSmart/CordovaYoutubeVideoPlayer

但不存在任何问题。

任何提示!谢谢!

推荐答案

似乎有关于cordova插件和 cordova版本7.0.0 +
插件现在需要包含package.json。例如,请查看此问题

There seem to be issues with cordova plugins and cordova version 7.0.0 +. The plugins now need to include a package.json. For example check this issue.

youtube插件没有 package.json

The youtube plugin does not have package.json

我建议你将cordova版本降级到7.0.0以下,直到修复为止。

I suggest you downgrade the cordova version to below 7.0.0 till it is fixed.

npm install -g cordova@version_number

这篇关于ionic-2原生youtube视频播放器插件无法安装?Cordova错误:无法获取插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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