Skip to content

ionic cordova plugin add fails, cordova plugin add works. #2385

@janpio

Description

@janpio

Short description of the problem:

This one plugin is strange:

PS C:\Users\Jan\Documents\v8Test> ionic cordova plugin add https://github.com/phonegap/phonegap-mobile-accessibility
> cordova plugin add https://github.com/phonegap/phonegap-mobile-accessibility --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/phonegap/phonegap-mobile-accessibility --s
... (exit code 1):

        Error: Failed to fetch plugin https://github.com/phonegap/phonegap-mobile-accessibility via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.
        Error: cmd: Command failed with exit code 1 Error output:
        npm ERR! git clone C:\Users\Jan\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-phonegap-phonegap-mo
bile-accessibility-git-1cc0f4ad C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417\git-cache-1bead2e2\e9821054c38fb203c3f
e632bd7bbaa02ca56e544: Cloning into 'C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417\git-cache-1bead2e2\e9821054c38fb2
03c3fe632bd7bbaa02ca56e544'...
        npm ERR! git clone C:\Users\Jan\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-phonegap-phonegap-mo
bile-accessibility-git-1cc0f4ad C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417\git-cache-1bead2e2\e9821054c38fb203c3f
e632bd7bbaa02ca56e544: error: cannot spawn sh: No such file or directory
        npm ERR! git clone C:\Users\Jan\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-phonegap-phonegap-mo
bile-accessibility-git-1cc0f4ad C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417\git-cache-1bead2e2\e9821054c38fb203c3f
e632bd7bbaa02ca56e544: fatal: unable to fork
        npm ERR! git clone C:\Users\Jan\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-phonegap-phonegap-mo
bile-accessibility-git-1cc0f4ad C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417\git-cache-1bead2e2\e9821054c38fb203c3f
e632bd7bbaa02ca56e544:
        npm ERR! Windows_NT 10.0.15063
        npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.
js" "install" "https://github.com/phonegap/phonegap-mobile-accessibility" "--save"
        npm ERR! node v6.10.3
        npm ERR! npm  v3.10.10
        npm ERR! code 128

        npm ERR! Command failed: git -c core.longpaths=true clone C:\Users\Jan\AppData\Roaming\npm-cache\_git-remotes\gi
t-https-github-com-phonegap-phonegap-mobile-accessibility-git-1cc0f4ad C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417
\git-cache-1bead2e2\e9821054c38fb203c3fe632bd7bbaa02ca56e544
        npm ERR! Cloning into 'C:\Users\Jan\AppData\Local\Temp\npm-9208-232ad417\git-cache-1bead2e2\e9821054c38fb203c3fe
632bd7bbaa02ca56e544'...
        npm ERR! error: cannot spawn sh: No such file or directory
        npm ERR! fatal: unable to fork
        npm ERR!
        npm ERR!
        npm ERR! If you need help, you may report this error at:
        npm ERR!     <https://github.com/npm/npm/issues>

        npm ERR! Please include the following file with any support request:
        npm ERR!     C:\Users\Jan\Documents\v8Test\node_modules\npm-debug.log

vs.

PS C:\Users\Jan\Documents\v8Test> cordova plugin add https://github.com/phonegap/phonegap-mobile-accessibility
Adding phonegap-plugin-mobile-accessibility to package.json
Saved plugin info for "phonegap-plugin-mobile-accessibility" to config.xml

Note that the plugin has a different repo name (phonegap-mobile-accessibility) than plugin name (phonegap-plugin-mobile-accessibility) but that should be no problem.

What behavior are you expecting?

Both working.

Post the output of ionic info below please

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.7
@ionic/cli-plugin-cordova       : 1.3.0
@ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms               : none
Ionic Framework                 : ionic-angular 3.3.0

System:

Node       : v6.10.3
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions