Can't add cordova plugin


Hi guys…I have tried to add cordova plugin like
cordova plugin add
But it shows some error like

( Error: Failed to fetch plugin 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 235 Error output:
npm ERR! addLocal Could not install /tmp/npm-7198-7761dc95/git-cache-321d8129/03fe48b62411cbff22229ca13cc3ac8b282f7945
npm ERR! Darwin 16.0.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “” "–save"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
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! /Users/vishnu/Desktop/projects/JUN 2017/Quickanet-master/node_modules/npm-debug.log )

What does it means?Please help me


Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

Cordova plugins need a package.json now. Fork the plugin, add one (look at others what is needed in there) and install your fork.

Update: Actually, see here for a PR that does exactly this and another repo that fixes the problem alltogether:


Alternatively, add sudo and see if it works.


That is bad advise and won’t help at all.


Okay! Sorry about that. :grin:


Thanks for the valuable reply…I will check it later.