Nativescript-cli: can't uninstall using npm uninstall nativescript -g after install unsuccessful

Created on 3 Jul 2017  ยท  9Comments  ยท  Source: NativeScript/nativescript-cli

Hey
i was trying to install nativescript before many times but got no lucky about
same error
You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.

All NativeScript components versions information
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Component โ”‚ Current version โ”‚ Latest version โ”‚ Information โ”‚
โ”‚ nativescript โ”‚ 3.1.1 โ”‚ 3.1.1 โ”‚ Up to date โ”‚
โ”‚ tns-core-modules โ”‚ โ”‚ 3.1.0 โ”‚ Not installed โ”‚
โ”‚ tns-android โ”‚ โ”‚ 3.1.1 โ”‚ Not installed โ”‚
โ”‚ tns-ios โ”‚ โ”‚ 3.1.0 โ”‚ Not installed โ”‚

run tns doctor

Support for Node.js 8.1.3 is not verified. This CLI might not install or run properly.
npm WARN
[email protected] No description
npm WARN [email protected] No repository field.
npm
WARN [email protected] No license field.

  • [email protected]
    added 1 package in 3.467s
    โ—  Verifying CocoaPods. This may take some time, please be patient..
    You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
    Run $ $ANDROID_HOME/tools/bin/sdkmanager to manage the Android Support Repository.

seems like miss the ANDROID's stuff
but when i check the dir
/usr/local/Caskroom/android-sdk
i can see there have a folder with named 3859397
and the size of the folder is 6.5G
so i think the android sdk should install well?

after fail serval times i give it up
so i trying to uninstall this

when i run this npm uninstall nativescript -g
and get error = = OMG
why is this have to be so hard

here is the debug log of npm

plz help me to uninstall this completely thank you very much!

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.1.3/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'uninstall',
1 verbose cli 'nativescript',
1 verbose cli '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session c41bf4309b3c1c08
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 verbose stack RangeError: Maximum call stack size exceeded
7 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:31:40)
7 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14
7 verbose stack at Array.forEach (native)
7 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25)
7 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14
7 verbose stack at Array.forEach (native)
7 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25)
7 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:377:5)
7 verbose stack at Array.forEach (native)
7 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
7 verbose stack at Array.forEach (native)
7 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
7 verbose stack at Array.forEach (native)
7 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
7 verbose stack at Array.forEach (native)
7 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
8 verbose cwd /Users/blank/HelloWorld
9 verbose Darwin 16.6.0
10 verbose argv "/usr/local/Cellar/node/8.1.3/bin/node" "/usr/local/bin/npm" "uninstall" "nativescript" "-g"
11 verbose node v8.1.3
12 verbose npm v5.0.3
13 error Maximum call stack size exceeded
14 verbose exit [ 1, true ]

question

All 9 comments

i am using Mac 10.12.5 version

/usr/local/bin/xcodeproj
Successfully installed xcodeproj-1.5.0
Parsing documentation for xcodeproj-1.5.0
Parsing sources...
100% [55/55] lib/xcodeproj/xcodebuild_helper.rb
1 gem installed

Configuring your system for Android development... This might take some time, please, be patient.
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
Do you want to install Android emulator? (y/n)
n
The ANDROID_HOME and JAVA_HOME environment variables have been added to your .bash_profile/.zprofile
Restart the terminal or run source ~/.bash_profile to use them.
Your components are up-to-date.

when i trying to reinstall android-sdk via brew cask reinstall android-sdk

Installing Cask android-sdk
==> Warning: File /Users/blank/.android/repositories.cfg could not be loaded.

when i trying to uninstall the node 8 and then reinstall the node version 6
it seems now tns info
All NativeScript components versions information
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Component โ”‚ Current version โ”‚ Latest version โ”‚ Information โ”‚
โ”‚ nativescript โ”‚ 3.1.1 โ”‚ 3.1.1 โ”‚ Up to date โ”‚
โ”‚ tns-core-modules โ”‚ 3.0.1 โ”‚ 3.1.0 โ”‚ Update available โ”‚
โ”‚ tns-android โ”‚ 3.2.0-next-2017-06-28-1901 โ”‚ 3.1.1 โ”‚ Up to date โ”‚
โ”‚ tns-ios โ”‚ 3.2.0-2017-6-30-2 โ”‚ 3.1.0 โ”‚ Up to date

so now finnally worked?
but run tns doctor
tns doctor
Verifying CocoaPods. This may take more than a minute, please be patient.
โ—œ Installing iOS runtime.npm
notice created a lockfile as package-lock.json. You should commit this file.

npm WARN
[email protected] No description
npm WARN [email protected] No repository field.

npm WARN
[email protected] No license field.

  • [email protected]
    added 1 package in 0.983s
    โ—  Verifying CocoaPods. This may take some time, please be patient..
    Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.
    Run $ $ANDROID_HOME/tools/bin/sdkmanager to manage your Android SDK versions.

You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=25'.
Run $ $ANDROID_HOME/tools/bin/sdkmanager from your command-line to install required Android Build Tools.

You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
Run $ $ANDROID_HOME/tools/bin/sdkmanager to manage the Android Support Repository.

Hi @blankhang can make sure sdkmanager exists

ls $ANDROID_HOME/tools/bin/sdkmanager

If it does not exists, then it is a problem with $ANDROID_HOME variable or your Android installation.

If it exists, then run those lines:

$ANDROID_HOME/tools/bin/sdkmanager "platform-tools"
$ANDROID_HOME/tools/bin/sdkmanager "tools"
$ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.3"
$ANDROID_HOME/tools/bin/sdkmanager "platforms;android-25"
$ANDROID_HOME/tools/bin/sdkmanager "extras;android;m2repository"
$ANDROID_HOME/tools/bin/sdkmanager "extras;google;m2repository"

and run tns doctor again?

thanks for response
Last login: Mon Jul 3 14:49:57 on ttys001
blankdeMBP:~ blank$ ls $ANDROID_HOME/tools/bin/sdkmanager
/usr/local/Caskroom/android-sdk/3859397/tools/bin/sdkmanager
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "platform-tools"
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "tools"
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.3"
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "extras;android;m2repository"
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
Warning: An error occurred while preparing SDK package Android Support Repository: SSL peer shut down incorrectly.
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "extras;google;m2repository"
Warning: File /Users/blank/.android/repositories.cfg could not be loaded.
done
blankdeMBP:~ blank$ tns doctor
Verifying CocoaPods. This may take more than a minute, please be patient.
โ—ž Installing iOS runtime.npm
โ—ก Installing iOS runtime. notice created a lockfile as package-lock.json. You should commit this file.

npm WARN [email protected] No description

npm WARN [email protected] No repository field.
npm WARN
[email protected] No license field.

  • [email protected]
    added 1 package in 2.749s
    โ— Verifying CocoaPods. This may take some time, please be patient..
    You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
    Run $ $ANDROID_HOME/tools/bin/sdkmanager to manage the Android Support Repository.

There seem to be issues with your configuration.
? Do you want to visit the official documentation? (Y/n)

Can you run:
touch /Users/blank/.android/repositories.cfg
..and then all the steps from the commend above

Last login: Mon Jul 3 21:55:22 on ttys000
blankdeMBP:~ blank$ ls $ANDROID_HOME/tools/bin/sdkmanager
/usr/local/Caskroom/android-sdk/3859397/tools/bin/sdkmanager
blankdeMBP:~ blank$ touch /Users/blank/.android/repositories.cfg
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "tools"
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.3"
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-25"
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "extras;android;m2repository"
done
blankdeMBP:~ blank$ $ANDROID_HOME/tools/bin/sdkmanager "extras;google;m2repository"
done
blankdeMBP:~ blank$ tns doctor
Verifying CocoaPods. This may take more than a minute, please be patient.
โ—Ÿ Installing iOS runtime.npm
โ—œ Installing iOS runtime.notice created a lockfile as package-lock.json. You should commit this file.

npm WARN
[email protected] No description
npm WARN [email protected] No repository field.
npm WARN
[email protected] No license field.

  • [email protected]
    added 1 package in 3.306s
    โ—  Verifying CocoaPods. This may take some time, please be patient..
    Your components are up-to-date.

No issues were detected.
blankdeMBP:~ blank$
it worked ?

Yeah, it looks everything is fine :)

thank you very much !!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

farfromrefug picture farfromrefug  ยท  3Comments

ZMW9 picture ZMW9  ยท  3Comments

kefahB picture kefahB  ยท  3Comments

PeterStaev picture PeterStaev  ยท  3Comments

jerbob92 picture jerbob92  ยท  3Comments