0

I tried many times and I also googled but in vain, I think it is a problem of stability of ionic!

When I run:

cordova plugin add https://github.com/Glitchbone/CordovaYoutubeVideoPlayer.git

I get this error:

Error: Failed to fetch plugin https://github.com/Glitchbone/CordovaYoutubeVideoPlayer.git 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\Houssem\AppData\Local\Temp\npm-3196-5b6372b9\git-cache-721c1a29\765b5954e78ecf7950099c10bfe5f81133f8f396

npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/Glitchbone/CordovaYoutubeVideoPlayer.git" "--save"

npm ERR! node v6.10.0 npm ERR! npm v3.10.10 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.

npm ERR! Please include the following file with any support request:

npm ERR! F:\WORK\EBOOK\ebookmuhammed\node_modules\npm-debug.log

Having that:

cordova --version  => 7.0.1
ionic --version    => 3.9.2
npm --version      => 3.10.10
MatSnow
  • 7,357
  • 3
  • 19
  • 31
Houssam Badri
  • 2,441
  • 3
  • 29
  • 60
  • It's trying to read a directory as a file. There are too many suggestions here to recommend anything, but I'd look at these answers and see if any of that resolves your issue: https://stackoverflow.com/questions/34959038/npm-stuck-giving-the-same-error-eisdir-illegal-operation-on-a-directory-read-a – Aaron Sep 08 '17 at 19:21
  • Thanks but that is not helping – Houssam Badri Sep 08 '17 at 19:33

1 Answers1

1

Well, what does the error message say:

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

Since cordova 7.0.0 cordova-plugins need a package.json file (Cordova 7.0.0 release notes). So fork the plugin add a package.json file copy the contents of a package.json file of another plugin and replace the values with ones that fit the plugin (plugin.xml is a good place for copying).

David
  • 7,387
  • 3
  • 22
  • 39