Unable to setup NativeScript on OS X 10.11.3: -bash: tns: command not found
See original GitHub issueOk guys I need help… and I’m rather new at this… So I went to the NativeScript site and I chose to do the quick one line command install:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.rb)"
The installation process went really smooth, I had the latest Xcode installed (7.2.1) and it prompted me for my password on all the places necessary. Another thing I’d like to point out is that I’m doing all of this on a fresh clean install of OS X 10.11.3 El Capitan.
Anyway so after the install I restarted the terminal as instructed and then like on the site instructions I tried to run: tns doctor
And once I hit ENTER the terminal gave me this error: Hedgerow:~ josueferret$ tns doctor -bash: tns: command not found
I once again went over the requirements and saw listed that you need the latest Xcode Command-line tools… however don’t these come bundled already with Xcode 7.2.1? I downloaded them separately anyway for the benefit of doubt and installed them. I the reboot my Mac just in case although i’m sure not needed and once again I got the same error. In fact I tried running other tns commands and none of them seem to be found at all:
Hedgerow:~ josueferret$ tns help -bash: tns: command not found
Please help… Anyone know why this is happening?
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (3 by maintainers)
You may try adding the tns executable to your $PATH variable, mine was in /usr/local/Cellar/node/6.3.1/lib/node_modules/nativescript/bin/
edit .bash_profile && .bashrc && ~/.profile and add following line PATH=$PATH:/usr/local/Cellar/node/6.3.1/lib/node_modules/nativescript/bin
or you could execute it as /usr/local/Cellar/node/6.3.1/lib/node_modules/nativescript/bin/tns doctor
I ended up running “npm install nativescript -g” to fix this issue