Nativescript-cli: When using tns run <platform> app is built and installed many times without change is made (android only)

Created on 23 Jan 2017  路  5Comments  路  Source: NativeScript/nativescript-cli

After running sdk examples for android then for ios, in android only - the app is built and installed over and over again without making any change in the app or interacting with it.

_NOTE:_ If first ios is run then android - everything's fine.

Here's the app - https://github.com/telerik/nativescript-ui-samples/tree/master

  1. Run the app for android - _tns run android_
  2. Then in another terminal tab run the app for ios - _tns run ios_
bug android

Most helpful comment

This issue comes with NativeScript CLI 2.5.0.

All 5 comments

This issue comes with NativeScript CLI 2.5.0.

My steps:

git clone [email protected]:telerik/nativescript-ui-samples.git
cd nativescript-ui-samples/sdk
tns update 2.5.0
tns run android
tns run ios # in another terminal

I don't manage to reproduce the issue with the steps above.

Then, if I execute:

rm -frv platforms
tns run android
tns run ios # in another terminal

I manage to reproduce the issue.

My guess is that platform adding, which happens on the tns run ios (installing iOS runtime package to __node_modules__ and removing it), triggers a loop of rebuilds for every file the package contains.

Workaround:

Execute tns run <platform> --no-watch|--justlaunch.

We need to figure out what behavior we want to support before we can do any work in a particular direction.

We should make the run command behave the same way, livesync did: tns run should try to livesync all platforms and a <platform> parameter should be optional.

Was this page helpful?
0 / 5 - 0 ratings