Nativescript-cli: Setup on macOS doesn't work at all - Xcode issues

Created on 5 Apr 2018  路  2Comments  路  Source: NativeScript/nativescript-cli

tns version 3.4.3

I can't get NativeScript installed properly on macOS. And my machine is a fairly clean install of High Sierra. Here's what's going on:

I've followed the installation instructions. I definitely have Xcode installed as well as the command line tools, yet tns doctor insists I don't have Xcode installed or configured properly. It doesn't say why.

It then asks me if I want to run the setup script, which fails (spawn EACCES). Turns out that the setup script didn't have execution permissions, so I had to chmod +x it. I ran the setup script, and got this:

? Do you want to run the setup script? Yes
These scripts require sudo permissions
NativeScript requires Xcode.
If you do not have Xcode installed, download and install it from App Store and run it once to complete its setup.
Do you have Xcode installed? (y/n)
y
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Xcode is not installed or not configured properly. Download, install, set it up and run this script again.
Your components are up-to-date:
nativescript,tns-core-modules,tns-android,tns-ios

When you file an issue, these warnings will help the NativeScript team to investigate, identify, and resolve the report.
Please, ignore them if you are not experiencing any issues with NativeScript.

It still insists something is wrong with Xcode.

Most helpful comment

Got it! Very obscure. xcode-select for whatever reason was not pointing to the right path after a fresh installation of Xcode.

$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This fixes the issue, and then tns doctor is happy.

All 2 comments

Got it! Very obscure. xcode-select for whatever reason was not pointing to the right path after a fresh installation of Xcode.

$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This fixes the issue, and then tns doctor is happy.

I tried all of the above, but with no luck. Then I came across this:
https://stackoverflow.com/questions/29485741/unable-to-upgrade-python-six-package-in-mac-osx-10-10-2 and tried the following:
export PYTHONPATH=/Library/Python/2.7/site-packages
python -m pip install --upgrade six

It seemed to solve the issue for me.

Was this page helpful?
0 / 5 - 0 ratings