Js files are not getting updated


Hello, I am using SideKick to generate a Navigation Drawer Angular+Typescript brand new project. Next, I add a new page (again through the SideKick). To show that page from the menu i am adding new link in the my-drawer.component.html as well as new route in the app-routing.module.ts. I am getting the error that my route is not defined and I cannot navigate to the new page. Couple of things i have noticed is that while I do update the app-routing.module.ts the app-routing.module.js file doesn’t get updated and still missing new line. Also, in the new page folder the .js files are not generated. So my question is , how to force update of the .js files when .ts file is updated. Also, what is the setting which update the js files after ts?


Hey @bigN13,

Sorry for the late reply here. TypeScript --> JavaScript compilation happens during builds, and then should happen again anytime you change a TypeScript file. If you’re not seeing that compilation that’s definitely a problem.

One thing you can try is doing a brand new build from Sidekick, which should trigger the compilation. If that fails you could try running tns run from the command line, if only as a debugging step to see if that fires off the TypeScript compiler.

Let us know if you’re able to get up and running.


Thank you for your reply. I have managed to find the issue and you are right, every step should be carefully tested before moving to the next one. I really would like your feeback on Http Gzip support issue if possible. Thx


I’m facing the same problem with the same template. I was changing the home.component when js has stopped updating. I returned everything back but it didn’t work. The app launches well in the simulator (ios), but I can see that a js file still is not up to date. Furthermore, I noticed that livesync only rerun app if you change .html files but not .ts (no matter which .ts you are updating, livesync just ignores it and js file not updating). Any thoughts?


Did you try restarting your computer?


This is a generic .js issue. To spot it, I would suggest you start from brand new project and update line by line the .ts file, while observing carefully the deployment. Occasionally it is good idea to restart the console as well. It is amazing how easy it is to break the project without noticing it.


Yes, I did, nothing’s changed…


Yes, for sure, that is something that I do quite often because it happens occasionally and I still can’t find a reverse action to get everything back on the stage before it’s broken.

It’s not a solution to start a brand new project every time when it happens, I’ve done it already a quite many times.

What is really interesting is that I kind of have an idea at which step it might crashes but when I undo all changes back to that step it doesn’t help anymore and I think if you braken this (not sure what exactly), even if you undo this changes .js will not be updated anymore and livesync stops watching .ts files and only reacts on sources such as html/scss/css


I was in similar situation. My solution was, after restoring the code to zero point : kill emulator, sometimes clear HD on emulator, restart cli and rebuild whole thing from the beginning. It sounds bit tedious but that was the only way i found it was working.


I do the same stuff, mate :slight_smile: erasing all content and settings and restarting the emulator, removing folders like platform/hooks, cleaning cache using xcode, completely reinstall npm in project. It indeed does help sometimes, but not with this one in my case, this is a really tough one, I’ve tried to do these actions a few times in a different order. The only way is to create a brand new project as you also have mentioned before but it’s a headache, especially if you already went far away with the developing process.


Can you send the output of running tns info in your project directory.
Also which OS are you using?