guyromb / cordova-open-native-settings

Plugin to open native screens of iOS/android settings (maintained, end-2020)
http://gsrweb.net
MIT License
113 stars 105 forks source link

Ionic/Cordova install problems #7

Closed emcniece closed 7 years ago

emcniece commented 7 years ago

I'm experiencing issues with installing this plugin via CLI:

# ionic cordova plugin add https://github.com/guyromb/Cordova-open-native-settings.git
> cordova plugin add https://github.com/guyromb/Cordova-open-native-settings.git --save
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova plugin add https://github.com/guyromb/Cordova-open-native-settings.git -... (exit code 1):

        Error: Failed to fetch plugin https://github.com/guyromb/Cordova-open-native-settings.git via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.
        Failed to get absolute path to installed module
# cordova plugin add https://github.com/guyromb/Cordova-open-native-settings.git --save
Error: Failed to fetch plugin https://github.com/guyromb/Cordova-open-native-settings.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

System Info:

# ionic info

global packages:

    @ionic/cli-utils : 1.3.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.3.0

local packages:

    @ionic/app-scripts              : 1.3.4
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : none
    Ionic Framework                 : ionic-angular 3.1.0

System:

    Node       : v7.9.0
    OS         : Linux 4.8
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

Any ideas?

BradyNadeau commented 7 years ago

I'm having the same issue. I got to do --nofetch for it to work properly but can't get the --nofetch setting to persist in CI builds.

emcniece commented 7 years ago

@BradyLiles are you using ionic cordova or just plain cordova?

I have a feeling this is happening because it's only a Github repo and not on npmjs.com. I know that Cordova is supposed to be able to handle plugins this way (documented), but check this out:

# ionic cordova plugin add cordova-open-native-settings-guyromb
> cordova plugin add cordova-open-native-settings-guyromb --save
✔ Running command - done!
Adding com.phonegap.plugins.nativesettingsopener to package.json
Saved plugin info for "com.phonegap.plugins.nativesettingsopener" to config.xml

Installing the https://www.npmjs.com/package/cordova-open-native-settings-guyromb plugin (by its plugin ID) works fine. Unfortunately this particular version is published by some other guy and is 10 commits stale.

@guyromb what can we do to help you publish and maintain this on npmjs.com? Would moving this repo to an organization help, or can we set up CircleCI to auto-publish when updates happen?

guyromb commented 7 years ago

@emcniece @BradyLiles Here is the NPM url: https://www.npmjs.com/package/cordova-open-native-settings

Does it solves your issue?

emcniece commented 7 years ago

So far so good!! Way to go @guyromb 🥇

# ionic cordova plugin add cordova-open-native-settings
> cordova plugin add cordova-open-native-settings --save
✔ Running command - done!
Adding com.phonegap.plugins.nativesettingsopener to package.json
Saved plugin info for "com.phonegap.plugins.nativesettingsopener" to config.xml

Made a PR with a few cleanup items: https://github.com/guyromb/Cordova-open-native-settings/pull/9

I think this issue can be closed.

guyromb commented 7 years ago

Cool @emcniece . Thank you!