ionic-2 本机 youtube 视频播放器插件安装失败?Cordova 错误:无法获取插件?

2024-02-20

你好,我正在构建一个 ionic-2 应用程序,它显示一些 YouTube 视频内容,我研究了 ionic 本机文档https://ionicframework.com/docs/native/youtube-video-player/ 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.

我还在这里引用了 github 链接https://github.com/JonSmart/CordovaYoutubeVideoPlayer https://github.com/JonSmart/CordovaYoutubeVideoPlayer

但不存在任何问题。

任何提示!谢谢!


cordova 插件似乎有问题cordova version 7.0.0 +。 插件现在需要包含 package.json。例如检查这个问题 https://github.com/Telerik-Verified-Plugins/ImagePicker/issues/55.

youtube 插件没有包.json https://github.com/JonSmart/CordovaYoutubeVideoPlayer

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

npm install -g cordova@version_number
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ionic-2 本机 youtube 视频播放器插件安装失败?Cordova 错误:无法获取插件? 的相关文章

随机推荐