Turning on Nativescript after restarting machine


Hi there,

I am new to NS. Started to do all the tutorials and had to restart my mac. Now when I put command “tns something” I got command not found. So I understand I have to somehow activate NS. But I have no clue how can I do that. Should I install it once again ? Sounds not logical :wink:

Thanks for help


Hello @Przemek,

The output your getting from the command “tns something” is due to Nativescript not being installed on your Mac.

After you install Nativescript you should be good to go to try any tns command.

Command to install Nativescript on Mac:

sudo npm install nativescript -g --unsafe-perm

Let me know if it fixed your issue. Thanks :slight_smile:


Hi :slight_smile:
thanks but no, it doesnt work
I still have it. And everything was fine before restart


Ok so from my experience i think that the problem is related to your permissions.

I woulda unnistall Nativescript and npm. And reinstall everything trying at most not the use the command “sudo”.

I had the same problem you are having at the moment, because i was writing “sudo” in every command i could have.

Follow this stackoverflow guide on how to re-install node.js

Then follow the quick-setup for macOS:


Also, while you try to do this. can you post here the picture of the error log?
It says on the picture you just posted where you can find the debug.log