Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on cordova plugin add - @latest not found #94

Closed
pat-flew opened this issue Nov 28, 2016 · 10 comments
Closed

Error on cordova plugin add - @latest not found #94

pat-flew opened this issue Nov 28, 2016 · 10 comments

Comments

@pat-flew
Copy link

Hi,

Receiving the following error on cordova install:

> cordova plugin add cordova-custom-config

Fetching plugin "cordova-custom-config" via npm
Error: Failed to fetch plugin cordova-custom-config via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: No compatible version found: cordova-custom-config@'latest'
Valid install targets:
["1.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.1.9","1.1.10","1.1.11","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","2.0.0","2.0.1","2.0.2","2.0.3","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9","3.0.10","3.0.11","3.0.12","3.0.13","3.0.14"]

But works when I set the version explicitly:

> cordova plugin add [email protected]

Fetching plugin "[email protected]" via npm
Installing "cordova-custom-config" for ios
cordova-custom-config: npm dependencies missing - installing
cordova-custom-config: Installed npm dependencies
@abshoff
Copy link

abshoff commented Nov 29, 2016

Run into the same problem. I think a tag named "latest" is missing.

I forked this repository and added the tag. For my cordova plugin, the following is working.

<dependency id="cordova-custom-config" url="https://bitbucket.org/abshoff/cordova-custom-config-hotfix-latest"/>

@dpa99c
Copy link
Owner

dpa99c commented Nov 29, 2016

Not able to reproduce this. What version of npm have you got installed? ([email protected] requires npm@3+)

@robations
Copy link

robations commented Nov 29, 2016

When I search for the plugin in npm I get two entries, seems unexpected to me:

$ npm search cordova-custom-config
NAME                      | DESCRIPTION          | AUTHOR          | DATE       | VERSION  | KEYWORDS                                                         
cordova-custom-config     | Cordova/Phonegap…    | =davealden      | 2016-11-26 | 3.1.0    | ecosystem:cordova cordova cordova-android cordova-ios phonegap co
cordova-custom-config     | Cordova/Phonegap…    | =davealden      | 2016-10-29 | 3.0.14   | ecosystem:cordova cordova cordova-android cordova-ios phonegap co

$ npm -v
4.0.2

$ node -v
v6.9.1

@dpa99c
Copy link
Owner

dpa99c commented Nov 29, 2016

@robations very weird, unsure what the hell happened when publishing to npm...

@dpa99c
Copy link
Owner

dpa99c commented Nov 29, 2016

Here's what I get on OSX 10.12:

$ npm search cordova-custom-config
NAME                      | DESCRIPTION          | AUTHOR          | DATE       | VERSION  | KEYWORDS                                                           
cordova-custom-config     | Cordova/Phonegap…    | =davealden      | 2016-11-26 | 3.1.0    | ecosystem:cordova cordova cordova-android cordova-ios phonegap conf
$ node -v
v5.6.0
$ npm -v
4.0.2
$ cordova plugin rm cordova-custom-config && cordova plugin add cordova-custom-config
cordova-custom-config: Skipping auto-restore of config file backup(s)
Uninstalling cordova-custom-config from android
cordova-custom-config: Skipping auto-restore of config file backup(s)
Uninstalling cordova-custom-config from ios
Removing "cordova-custom-config"
Fetching plugin "cordova-custom-config@*" via npm
Installing "cordova-custom-config" for android
Installing "cordova-custom-config" for ios
$ cordova plugin ls
cordova-custom-config 3.1.0 "cordova-custom-config"

@pat-flew
Copy link
Author

pat-flew commented Nov 29, 2016

Turns out I get this behaviour with cordova @ 5.4.1. If I upgrade to 6.4, it works.

$ npm -v
4.0.2

$ node -v
v7.0.0

$ npm install -g [email protected]

$ cordova -v
5.4.1

$ cordova plugin add cordova-custom-config
Fetching plugin "cordova-custom-config" via npm
Error: Failed to fetch plugin cordova-custom-config via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: No compatible version found: cordova-custom-config@'latest'
Valid install targets:
["1.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.1.9","1.1.10","1.1.11","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","2.0.0","2.0.1","2.0.2","2.0.3","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9","3.0.10","3.0.11","3.0.12","3.0.13","3.0.14"]

$ npm install -g [email protected]

$ cordova -v
6.4.0

$ cordova plugin add cordova-custom-config
Fetching plugin "cordova-custom-config" via npm
Installing "cordova-custom-config" for ios
cordova-custom-config: npm dependencies missing - installing
cordova-custom-config: Installed npm dependencies

@robations
Copy link

robations commented Nov 29, 2016

Earlier post was with cordova 6.3.1. Upgrading to 6.4.0 seems to fix it for me* ✓

* fixes the plugin add problem, still have two search entries!

@dpa99c
Copy link
Owner

dpa99c commented Nov 30, 2016

I've removed the engines block which was requiring npm@3+ in the package.json and pushed this out as [email protected]. This appears to resolve the issue for me as I can now do cordova plugin add cordova-custom-config@latest again without error. Seems the engines restriction has a side effect on the Cordova CLI.

Please let me know if this resolves the issue for you.

@pat-flew
Copy link
Author

Yes works for me now on cordova 5.4.1

@dpa99c
Copy link
Owner

dpa99c commented Nov 30, 2016

Pretty sure that was it, so closing this now.

@dpa99c dpa99c closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants