May 5, 2017

Solution: Error: NativeScript CLI not found. Use ‘nativescript.tnsPath’ workspace setting to explicitly set the absolute path to the NativeScript CLI.

Have you ever had this error message in Visual Studio Code with the nativescript-vscode extension? (I use Ubuntu 16.04)

I had this problem for a while now and didn’t find any bug report that helped me, after adding the correct ‘nativescript.tnsPath’ to the workspace settings, the problem still exists.

The most funny part, from the Visual Studio Code terminal window, I could call “tns” as normal and it works, so the nativescript-cli is correctly installed.

Solution:

Just use your normal terminal and navigate into your NativeScript App root folder, use code .  to start Visual Studio Code with the actual folder.

There you go, the extension should work properly.

If I start Visual Studio Code from the desktop entry/ terminal, the nativescript folder is still open as last used folder, but I get the “Error: NativeScript CLI not found. Use ‘nativescript.tnsPath’ workspace setting to explicitly set the absolute path to the NativeScript CLI.” again.

I hope this helps someone, too.


Frederik von Berg

Entwickler bei thecodecampus

Leave a Reply

Your email address will not be published. Required fields are marked *