question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to setup NativeScript on OS X 10.11.3: -bash: tns: command not found

See original GitHub issue

Ok 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:closed
  • Created 8 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
sushrestcommented, Sep 3, 2016

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

3reactions
nickramageuniversal9commented, Nov 29, 2018

I ended up running “npm install nativescript -g” to fix this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to setup NativeScript on OS X 10.11.3: -bash: tns
Ok guys I need help... and I'm rather new at this... So I went to the NativeScript site and I chose to do...
Read more >
NativeScript tns doctor command not found - Stack Overflow
If you have installed both Node.js and nativescript, and you are still unable to execute tns doctor , you might check if the...
Read more >
Troubleshooting - NativeScript Docs
Start by removing the existing platform(s) with the tns platform remove command. Next, add back the platforms and install any new npm dependencies...
Read more >
NativeScript - Installation - Tutorialspoint
We can use tns to create and develop application even without any additional setup. But, we could not able to deploy the application...
Read more >
'tns' is not a recognized command - Google Groups
I have installed NativeScript CLI and whenever I try using the tns command, I get this error: "'tns' is not a recognized internal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found