don/cordova-filechooser

Plugin not installing on ionic v 3.1

Opened this issue ยท 14 comments

I have issue
This plugin is not installing on ionic v 3.1
I tried following command
ionic cordova plugin add https://github.com/don/cordova-filechooser.git

Same problem on my side, ionic v3.1.2. Having error EISDIR on installation specifically for this plugin on my Mac

I have resolved this issue after downgrade cordova to v6.5
sudo npm install cordova@6.5.0 -g

I went to install today, gave this error:
Error: Failed to fetch plugin http://github.com/don/cordova-filechooser.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.

Downgrade Cordova version to version @6.5.0
It will resolved this issue.

Had the same issue with https://github.com/Telerik-Verified-Plugins/ImagePicker
Seems as though cordova versions 7+ require a package.json to be included with the plugin (even the error states - This is most likely not a problem with npm itself and is related to npm not being able to find a package.json in a package you are trying to install.) The way to resolve the problem was to fork the repo and add a package.json yourself and install that version of the plugin, which fixes the error (the project as of now has 379!! forks) or downgrade cordova

This is not an ionic specific issue. This is related to changes in the cordova plugin fetch. Plugins now require a package.json file.

I made a mistake mentioned here, but you can try my fork meanwhile.

How can i downgrade cordova ?

sudo npm install cordova@6.5.0 -g

@luckylooke Hi. I am verynew to ionic and programming (35 days). Thank you for your repo. But everything filechooser (yours, iHadeed, mfilechooser, etc.) refuses to work in our project.

plugin not installed
or
uri plugin not installed

But everything else looks okay: app.module, package.json, etc.

Kindly help.

@BenedictRinga I am sorry but I am not actively using ionic now, but only thing come to my mind, didnt you forget to run:

cordova plugin add https://github.com/luckylooke/cordova-filechooser.git

maybe nowadays it is ionic cordova add ... or just ionic add ... I don know, please refer to docs. But this is the command which should install the plugin in your project. You should be able to see reference in config.xml then.

Hope it helped a bit. Happy coding :)

@BenedictRinga I am sorry but I am not actively using ionic now, but only thing come to my mind, didnt you forget to run:

cordova plugin add https://github.com/luckylooke/cordova-filechooser.git

maybe nowadays it is ionic cordova add ... or just ionic add ... I don know, please refer to docs. But this is the command which should install the plugin in your project. You should be able to see reference in config.xml then.

Hope it helped a bit. Happy coding :)

Many thanks!

Came back to it, and ran the plugin install. Error still.

Failed to fetch plugin http://github.com/ihadeed/cordova-filechooser.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t ssh://git@github.com/ihadeed/cordova-filechooser.git
npm ERR!
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.