Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tns update <version> does not work #3202

Closed
dtopuzov opened this issue Nov 7, 2017 · 17 comments
Closed

tns update <version> does not work #3202

dtopuzov opened this issue Nov 7, 2017 · 17 comments
Assignees
Labels
Milestone

Comments

@dtopuzov
Copy link
Contributor

dtopuzov commented Nov 7, 2017

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.
@dtopuzov dtopuzov added the bug label Nov 7, 2017
@dtopuzov dtopuzov changed the title tns update <version> do not work tns update <version> do not work Nov 7, 2017
@petekanev petekanev changed the title tns update <version> do not work tns update <version> does not work Nov 7, 2017
@erkanarslan
Copy link

I cannot upgrade to version 3.3.0. I hope this is fixed soon.

@KristianDD KristianDD reopened this Nov 30, 2017
@dtopuzov dtopuzov added this to the 3.4.0 milestone Nov 30, 2017
@erkanarslan
Copy link

Is this fixed or not?

@KristianDD
Copy link
Contributor

KristianDD commented Nov 30, 2017

Hi @erkanarslan,
The fix for the issue is merged in master branch and is being verified by our QA team. The fix should be included in the next official release.
As a temporary workaround you can use tns platform remove <platform> and then tns platform add <platform>@version. If you need to update the CLI tooling you can use npm remove nativescript -g and then npm i nativescript -g.
I'd also like to remind you that the update command will not update the CLI (nativescript package), and you will have to handle it manually.

@marcocasadio
Copy link

I still have the issue to update nativescript to 3.4.3.... Any suggest?
Now I can't use Sidekick because it needs the 3.4.3 of nativescript cli to works

@Fatme
Copy link
Contributor

Fatme commented Mar 11, 2018

hey @marcocasadio,

Can you give us more information about the issue you have? Are you using update command or npm install? Please tell us how to recreate the issue in as much detail as possible.

@marcocasadio
Copy link

Hi @Fatme!
I run "tns update 3.4.3" and I get "Could not update the project!"
I've a project with angular + typescript.
I've tried to remove nativescript and reinstall with the commands wrote by @KristianDD but I always get the 3.4.2 version and I can't use Sidekick.

@sroy93
Copy link

sroy93 commented Mar 21, 2018

I have this same issue trying to update to 3.4.3. I also cannot use Sidekick and I need it asap.

@rosen-vladimirov
Copy link
Contributor

rosen-vladimirov commented Mar 21, 2018

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.

@marcocasadio
Copy link

@rosen-vladimirov now it seems ok! (@sroy93)
after the uninstall I launched these commands: https://docs.npmjs.com/misc/removing-npm

thanks

@sroy93
Copy link

sroy93 commented Mar 22, 2018

It seems as though nativescript will not uninstall.. Even after I run the uninstall command, I can do
tns --version and get a result back..

What directory should I be starting in when I execute these commands?

@marcocasadio
Copy link

@sroy93 I had your same issue. I also removed npm and reinstalled with nvm. I did the commands from my home folder.

@sroy93
Copy link

sroy93 commented Mar 22, 2018

I think I figured something out, I just don’t know what to do about it… I believe that maybe nativescript is installed somewhere other than the npm folder… I say this because I can uninstall Nativescript with the npm commands and the nativescirpt folder disappears from within the npm folder. However, it is definitely still installed somewhere, somehow… I can run tns doctor and get the current version. Is there a way for me to check where else it’s installed? And/Or a way for me to uninstall it other than using the npm command?

@rosen-vladimirov
Copy link
Contributor

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.

@sroy93
Copy link

sroy93 commented Mar 23, 2018

Ah okay, thank you @rosen-vladimirov !! In order to remove it, do I just delete the folder that contains it?

@tonyhogben
Copy link

@sroy93, how did you remove it? I have the same issue, but no-one seems to offer any advice on how to actually remove the other installation once you have run which tns and found it!

@sroy93
Copy link

sroy93 commented Jan 20, 2020

It's been a while since I did this.. I know I have notes on it somewhere, but I am going to have to dig to find them.
I want to say I had to run my command prompt as administrator and navigate to the folder where I found the install at and run the uninstall commands there. That, or remove the files manually as admin and then try.
I will look for my notes. Let me know if either of those suggestions help.

@jitendraashutec
Copy link

jitendraashutec commented Aug 4, 2020

I am updating nativescript: I am using tns update next command to update angular-nativescript project. I want to use latest tns. I am using sharing project. which is used for mobile and web.

When I am use tns update next it gives me below error.

Could not update the project! Reason is: Unable to execute update as package @nativescript/webpack does not have version/tag next. Please enter valid version or npm tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants