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.

Related Posts

Avatar photo

theCodeCampus
Developer at thecodecampus </>

Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.


Leave a Reply

Add code to your comment in Markdown syntax.
Like this:
`inline example`

```
code block
example
```

Your email address will not be published.