Native 3.x installing geolocation plugin error

first i run the `npm install @ionic-native/geolocation --save’ command and here is what i get

`-- @ionic-native/geolocation@3.4.4

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"da
rwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Then attempting to add the actual plugin ionic plugin add corodva-plugin-geolocation
I get the following error

[ERROR] Unknown plugin: @ionic/cli-plugin-.

my ionic info

Your system information:

Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 3.0.0-beta.5
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.9.0
Xcode version: Not installed

If you don’t get any better answers, I would try downgrading the CLI to a stable version.

Here someone had the same problem and posted a “solution”: [ERROR] Unknown plugin: @ionic/cli-plugin- - #13 by inetkid It sounds pretty strange, could you try and report back?

Actually, you are on the CLI beta, that means you are using the wrong command to add the plugin:
https://github.com/driftyco/ionic-cli/blob/v3/docs/cordova-plugin.md

1 Like

I created an issue with the CLI that usage like this probably should be handled:


(+1 votes welcome…)

yep i found that somewhere that the command has changed, and not in documentation but on some stackoverflow post, i think ionic team needs a ionic native 2.x<>ionic 3.x and ionic framework 2.x <> ionic framework 3.x mapping for dummies documentation and exactly what one must do. The documentation is all over the place and not very clear what version of ionic native/framework it is for.

for example, here is how it states to add the calendar

this does not work, and one must run the SECOND command on that page first, then ionic cordova:plugin add cordova-plugin-calendar

I understand that it’s all confusing, but to be fair that documentation is written for the current stable version of the CLI, and Ionic CLI 3 is clearly marked as beta.

In my mind it wouldn’t make sense to update all the plugin documentation for a beta CLI at the moment, since they’re counting on you to know what you’re doing if you’re using a beta version.

2 Likes

i guess as a new beta tester of the new cli i did not have the right info or right places to look at, hell for the longest time today i thought both cli and framework were prod v3

It has both of those things: this describes native 3 and this describes framework 3, with additional explicit mention of changes in native 3.

You are dealing with CLI 3, which is prerelease software. IMHO it does not make sense to waste limited resources on additional handholding documentation for it at this point.

1 Like