'tns' is not recognized as an internal or external command, operable program or batch file. NativeScript

Robert Green MBA picture Robert Green MBA · May 5, 2016 · Viewed 7.8k times · Source

I am new to NativeScript and am currently going through the installation steps described here (http://docs.nativescript.org/angular/tutorial/ng-chapter-1) and I just completed executing the PowerShell script

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1'))"

and then I run

tns doctor 

and I get

 C:\>tns doctor 'tns' is not recognized as an internal or external command, operable program or batch file.

Answer

Hüseyin Sekmenoğlu picture Hüseyin Sekmenoğlu · Jan 29, 2020

Use this code

npm install --global nativescript

I had the same isssue and installing nativescript solved it.