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

install failed #3

Closed
ChrisDevinePimss opened this issue Mar 5, 2018 · 10 comments
Closed

install failed #3

ChrisDevinePimss opened this issue Mar 5, 2018 · 10 comments

Comments

@ChrisDevinePimss
Copy link

ChrisDevinePimss commented Mar 5, 2018

cordova plugin add cordova-plugin-iroot --save
(node:6348) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Cannot find plugin.xml for plugin "cordova-plugin-iroot". Please try adding it again.
(node:6348) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

also

ionic cordova plugin add https://github.com/WuglyakBolgoink/cordova-plugin-iroot

cordova plugin add https://github.com/WuglyakBolgoink/cordova-plugin-iroot --save
(node:12248) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch plugin https://github.com/WuglyakBolgoink/cordova-plugin-iroot 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! code 128
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
npm ERR! fatal: 'submodule' appears to be a git command, but we were not
npm ERR! able to execute it. Maybe git-submodule is broken?
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\chrisdevine\AppData\Roaming\npm-cache_logs\2018-03-05T10_18_26_219Z-debug.log
(node:12248) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@WuglyakBolgoink
Copy link
Owner

@ChrisDevinePimss

are you have already installed plugin before? or you try to install in new project?

@Chris-Devine
Copy link

@WuglyakBolgoink

I installed into new project and it worked but prevented me from installing "cordova-plugin-network-information". So i had to uninstall it so i could install the rest of my plugins.

I then tried to reinstall it once i had installed all the other plugins but got the errors above

@WuglyakBolgoink
Copy link
Owner

@Chris-Devine can you give me this information from

ionic info

I check this problem today night.

@ChrisDevinePimss
Copy link
Author

PS C:\Users\chrisdevine\Desktop\agility-for-pimss\agility-for-pimss2> ionic info
[WARN] Error with .\www\lib\ionic\version.json file: FILE_NOT_FOUND, trying .\bower.json.

cli packages: (C:\Users\chrisdevine\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0
Gulp CLI              : CLI version 2.0.1 Local version 3.9.1

local packages:

Cordova Platforms : none
Ionic Framework   : ionic1 1.3.4

System:

Node : v8.9.4
npm  : 5.6.0
OS   : Windows 10

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

@WuglyakBolgoink
Copy link
Owner

@ChrisDevinePimss / @Chris-Devine with which platforms will you work? Android or iOS?

@ChrisDevinePimss
Copy link
Author

yes thats the plan @WuglyakBolgoink

@Medtrack
Copy link

Medtrack commented Mar 12, 2018

I can confirm this bug on Android.
Cordova version 8.0.0 and cordova-android@~7.0.0
Just create a script or run the following commands:

#!/usr/bin/env bash
currentDir=$(pwd)
cordova create hello com.example.hello HelloWorld
cd hello
cordova plugin add cordova-plugin-iroot --save
cordova platform add android
cd $currentDir

And this is the error:

$ mkhello
Creating a new cordova project.
Adding cordova-plugin-iroot to package.json
Saved plugin info for "cordova-plugin-iroot" to config.xml
Using cordova-fetch for cordova-android@~7.0.0
(node:21017) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch platform cordova-android@~7.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! path /Users/medtrack/Desktop/gu/hello/node_modules/cordova-plugin-iroot
npm ERR! code EISGIT
npm ERR! git /Users/medtrack/Desktop/gu/hello/node_modules/cordova-plugin-iroot: Appears to be a git repo or submodule.
npm ERR! git /Users/medtrack/Desktop/gu/hello/node_modules/cordova-plugin-iroot
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/medtrack/.npm/_logs/2018-03-12T16_27_31_156Z-debug.log
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:312:25
at _rejected (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:797:24)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:823:30
at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:808:41)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44
at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13)
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:150:11)
(node:21017) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21017) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
l$

@SujitSingh
Copy link

SujitSingh commented Mar 13, 2018

@Medtrack I have added working solution for this issue #1. Try removing .git folder from package folder under node_modules.

If that doesn't works, delete node_modules and plugins folders and package-lock.json file and reinstall plugins using npm i in your project folder.
Note - You have to remove .git folder(as mentioned above) before building android apk file.

@ChrisDevinePimss you can also try this solution. I too got similar errors during initial installations of this plugin after latest changes.

@WuglyakBolgoink
Copy link
Owner

@Chris-Devine @SujitSingh please check with new v0.7.0. npm publish was without errors.

@WuglyakBolgoink WuglyakBolgoink added this to the 0.7.0 milestone Apr 3, 2018
@SujitSingh
Copy link

The error reported in this issue is related to the extra .git folder which has been resolved in #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants