Failed to fetch platform cordova-android@~6.2.2
From @iamkhan001 on June 9, 2017 7:20
getting error while adding android platform
D:\Imran\ionic\notifications>ionic cordova platform add android
cordova platform add android --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 platform add android --save (exi t code 1):
Using cordova-fetch for cordova-android@~6.2.2
Error: Failed to fetch platform cordova-android@~6.2.2
Probably this is either a connection problem, or platform spec is incorr
ect. Check your connection and platform name/version/URL. Error: cmd: Command failed with exit code ENOENT
Copied from original issue: ionic-team/ionic#11989
From @piotrowski on June 9, 2017 8:37
As the error message says:
Probably this is either a connection problem ... Check your connection
Are you behind a corporate proxy?
I'm getting something similar:
Error: Failed to fetch platform [email protected]
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 194 Error output:
npm ERR! path /Users/todd/code/expedition-app/node_modules/es6-promise-plugin/package.json
npm ERR! code ELOOP
npm ERR! errno -62
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open '/Users/todd/code/expedition-app/node_modules/es6-promise-plugin/package.json'
The NPM log file:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/todd/.nvm/versions/node/v8.1.2/bin/node',
1 verbose cli '/Users/todd/.nvm/versions/node/v8.1.2/bin/npm',
1 verbose cli 'install',
1 verbose cli '[email protected]',
1 verbose cli '--save' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session f287ac4f152a5ee4
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/cordova-android 19ms (from cache)
8 silly pacote version manifest for [email protected] fetched in 63ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly fetchPackageMetaData error for es6-promise-plugin@file:node_modules/es6-promise-plugin ELOOP: too many symbolic links encountered, open '/Users/todd/code/expedition-app/node_modules/es6-promise-plugin/package.json'
13 verbose stack Error: ELOOP: too many symbolic links encountered, open '/Users/todd/code/expedition-app/node_modules/es6-promise-plugin/package.json'
14 verbose cwd /Users/todd/code/expedition-app/node_modules
15 verbose Darwin 16.6.0
16 verbose argv "/Users/todd/.nvm/versions/node/v8.1.2/bin/node" "/Users/todd/.nvm/versions/node/v8.1.2/bin/npm" "install" "[email protected]" "--save"
17 verbose node v8.1.2
18 verbose npm v5.0.3
19 error path /Users/todd/code/expedition-app/node_modules/es6-promise-plugin/package.json
20 error code ELOOP
21 error errno -62
22 error syscall open
23 error ELOOP: too many symbolic links encountered, open '/Users/todd/code/expedition-app/node_modules/es6-promise-plugin/package.json'
24 verbose exit [ -62, true ]
Downgraded from Node 8 to Node 6 (as suggested here: https://github.com/katzer/cordova-plugin-local-notifications/issues/1329) and cordova was able to add android. Still ran into some difficulties with old plugins whose repos lacked package.json files, so had to hunt down forks of those plugins that're maintained / have a package.json file.
@toddmedema Thank you for the information.
Hi, What was the solution here?
@dwieeb @jgw96 What effect does the proxy have and how do you go around it?
i have this error plz help me
@hadijahangiri Try setting path = "C:\Windows\System32" in variable/system variable
add this line in your environment varible in path C:\Windows\System32 its working now
× Running command - failed! [ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2


How to fix it ?
@jumong you must open windows environment variables and add to path = "C:\Windows\System32" in system variables
ok thanks
On Sat, Aug 19, 2017 at 8:51 AM, madsongr [email protected] wrote:
@jumong https://github.com/jumong you must open windows environment variables and add to path = "C:\Windows\System32" in system variables
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ionic-team/ionic-cli/issues/2412#issuecomment-323489270, or mute the thread https://github.com/notifications/unsubscribe-auth/AYOO8OLPFKLXs5p-J-D9inHb5ickLAthks5sZjF9gaJpZM4N1a12 .
@madsongr my os osX
Am having the same issue now and adding "C:\Windows\System32" did not resolve my issue. Any help here would be great.
My Ionic Info command returns the below:
@ionic/cli-utils : 1.9.2 ionic (Ionic CLI) : 3.9.2global packages:
Cordova CLI : 7.0.1local packages:
@ionic/app-scripts : 2.1.3 Cordova Platforms : android 5.1.1 Ionic Framework : ionic-angular 3.6.0System:
Node : v6.11.0 npm : 3.10.10 OS : Windows 10
i have the same error.. I add C:\Windows\System32, but the same error
@jln1989 @Daym3l did you try to open windows cmd again? Every change on system environment variables requires to close cmd and open it again.
@jln1989 is it working now?
@madsongr yes thank you