nativescript-cli: `tns update ` does not work

Help says:

tns update --help
# platform update

│ Usage                          │ Synopsis               │
│ Update with the latest version │ $ tns update           │
│ Update with specific version   │ $ tns update <version> │

Updates a NativeScript project to the latest (or specified) version.

tns update 3.3.0 results in:

Invalid platform 3.3.0. Valid platforms are ios or android.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Hey @sroy93 , you can use which tns on macOS and Linux and where tns on Windows to get the path where NativeScript CLI is installed. After you find it, you can remove it and use the same command to see if it is not installed somewhere else.

Hey @marcocasadio , @sroy93 , Can you try the following commands:

$ npm cache clean --force
$ npm uninstall -g nativescript
$ which tns # This command will show you if you have installed NativeScript CLI somewhere else - it should return empty result in case the package is not installed anywhere
$ npm install -g nativescript@latest

This should install the latest version of NativeScript CLI on your side.