moust / cordova-plugin-videoplayer

A Codova plugin to play video with the native MediaPlayer on Android devices.
MIT License
139 stars 102 forks source link

No way to install plugin with ionic / Cordova #43

Open francescodoffizi opened 6 years ago

francescodoffizi commented 6 years ago

ionic cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git

cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git --save ✖ Running command - failed! [ERROR] An error occurred while running cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git

    --sav... (exit code 1):

    Error: Failed to fetch plugin https://github.com/moust/cordova-plugin-videoplayer.git via registry.
    Probably this is either a connection problem, or plugin spec is incorrect.
    Check your connection and plugin name/version/URL.
    Failed to get absolute path to installed module
stevebissoue commented 6 years ago

Chez Moi aussi ça ré&gi de la meme façon

codinronan commented 6 years ago

This error is because https://github.com/moust/cordova-plugin-videoplayer.git is not a known package name in NPM and Cordova installs plugins from NPM as of version 6.

You can install from git links using cordova plugin add ????? --no-fetch to avoid the NPM lookup and go straight to the Git repo. Keep in mind you'll have to do this when using cordova prepare as well, it won't be able to automatically resolve the plugins for you.

In this case though the plugin author has published the package in NPM as cordova-plugin-video-player so you can just do cordova plugin add cordova-plugin-video-player and it works fine.

raoel commented 6 years ago
> cordova plugin add cordova-plugin-video-player  
Error: Failed to fetch plugin git+https://github.com/moust/cordova-plugin-videoplayer.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

unfortunately not :-(

npm version: 5.8.0 cordova: 7.1.0 Linux debian