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

How to install a specific version of NativeScript? #7926

Closed
fabriek-huis opened this issue Oct 9, 2019 · 3 comments
Closed

How to install a specific version of NativeScript? #7926

fabriek-huis opened this issue Oct 9, 2019 · 3 comments
Labels

Comments

@fabriek-huis
Copy link

I tried -

npm remove -g nativescript
npm install -g nativescript@version --- 5.4.0

Doesnt seem to work?

No valid versions available for 5.4.0

Also tried -
tns update 5.4.0 once latest NativeScript is installed. But says;

This project is not compatible with the current NativeScript version and cannot be updated. Use "tns migrate" to make your project compatible.

I can't compile/run my app anymore after migrating/installing v6.

@NickIliev
Copy link
Contributor

@Sputn1k the command npm i -g nativescript will install the NativeScript CLI. It won't update/migrate your existing project. However, once you have installed a specific version of the CLI, you can use it to create new projects with the related versions.

For example

npm uninstall -g nativescript
npm i -g nativescript@5.4.0
tns --version // will output 5.4.0

One, you have the wanted version of the CLI you can create a project that uses the core dependencies (e.g., runtime, modules) that were compatible with that CLI version

tns create my-app --tsc

and the generated pckage.json will look like this

{
  "nativescript": {
    "id": "org.nativescript.myapp",
    "tns-android": {
      "version": "5.4.0"
    },
    "tns-ios": {
      "version": "5.4.2"
    }
  },
  "main": "app.js",
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "nativescript-theme-core": "~1.0.4",
    "tns-core-modules": "~5.4.0"
  },
  "devDependencies": {
    "nativescript-dev-typescript": "~0.10.0",
    "nativescript-dev-webpack": "~0.24.0"
  },
  "gitHead": "8c1a4866a66daab09bf5ef8e5a96472687192373",
  "readme": "NativeScript Application"
}

@support
Copy link

support bot commented Oct 9, 2019

👋 @Sputn1k, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please, use Stackoverflow to get help.

@support support bot closed this as completed Oct 9, 2019
@fabriek-huis
Copy link
Author

@NickIliev Thanks I'll try that out cheers

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

2 participants