How can I flush JS cache files when tns run android



I need it when I run a new compilation using tns command

For example I have a log:

JS: ==== received table item:  {
JS:   "id": 1,
JS:   "number": 1,
JS:   "roomId": 1,
JS:   "sale": null
JS: }

And I changed this log to anything else but I always receive the same log ever.

My JS compiled file always contains the old log hard-coded.

Edit to add more information.

After 10 min of compilation and removing manually this JS files again and again, the cached JS files changed.

Edit - occurrences of the problem

  • after 10 minutes
  • an hour later in another project when I try to change the status bar color

Anyone knows how to flush JS cache file automatically?


I think good changes were made AFTER nativescript-angular: ~5.3.0.
We need to make some changes to run it correctly. (I didn’t know before).


Now in another stage of the project I face this same problem.

Now my environments are:

  • MacOS High Sierra 10.13.6
  • npm 5.6.0
  • node v8.11.3
  • tns 4.1.2

The steps I follow to try to solve is below:

  • Remove the platforms with tns platform remove <Platform>
  • Remove the JS files that were compiled
  • Remove the hooks/ directory
  • Remove package-lock.json file
  • Clear cache npm with the -f parameter
  • Install NPM dependencies again
  • Install platforms again running tns run (to both platforms)

…but no solution.

Edit - reset the system

Follow the instructions above and restart the system.
Work it for now.