Sergio Prado
Sergio Prado

Reputation: 1216

InAppBrowser - "phonegap plugin add" fails

This seems like a relatively common issue, but I can't seem to find any solution that works for my situation.

When I try to install the InAppBrowser plugin, it always fails.

These are the commands I've tried:

sudo phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git

This results in the error [error] Cannot read property 'install' of undefined

git clone https://github.com/apache/cordova-plugin-inappbrowser
cd cordova-plugin-inappbrowser
git checkout 3.1.0
cd $MY_PHONEGAP_APP
phonegap local plugin add /.../cordova-plugin-inappbrowser

When I do the git checkout command, it results in the error error: pathspec '3.1.0' did not match any file(s) known to git. If I skip that step, I get the error [error] Fetching plugin failed: Error: Failed to fetch package information for /.../cordova-plugin-inappbrowser

These are other things I've tried:

Nothing seems to work. Help would definitely be appreciated. Thanks!

Upvotes: 2

Views: 4410

Answers (2)

wisbucky
wisbucky

Reputation: 38023

For me, the solution was to update plugman module:

npm install -g plugman

Upvotes: 1

Sergio Prado
Sergio Prado

Reputation: 1216

Turns out there's (probably) some sort of bug in the latest plugin version that's been screwing up installation. I've gone ahead and installed an older version (by adding @{version_number} at the end). This works for me:

sudo phonegap local plugin add [email protected]

Upvotes: 6

Related Questions