Ionic serve / ionic run not reflecting changes


#1

Both ionic serve and ionic run are not reflecting any of my latest changes. ionic serve is showing them from a few hours ago, and ionic run is showing them from about an hour later. Since then, I’ve discarded all my changes, and created a new branch from the parent–yet it’s still showing those same versions from a few hours ago on the first branch. In short, there’s code showing up that I don’t have in any files in this, or any, branch. And no uncommitted changes.

I’m not sure what details would help figure out what’s happening here.

Your system information:

Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v6.10.1
Xcode version: Xcode 8.3.1 Build version 8E1000a

#2

Somehow it’s not rebuilding your /src to /www :confused:

Try running npm run clean and then the commands you mentioned again.
If this doesn’t work try npm run build.


#3

Still no change. Something else I’ve noticed is that this is what shows up in my console currently:

Static file server running @ http://localhost:8000/index.html
CTRL + C to shut down

200 /service-worker.js

Whereas it previously displayed a list of html, css, etc. requests when the page loaded.


#4

Currently, I can make it work as expected by unregistering and removing all ServiceWorkers at
chrome://serviceworker-internals/
and
chrome://inspect/#service-workers


#5

I solved this by cheking Update on reload, from Service Workers menu in Application tab. I don’t know if this is normal setting, but it’s how I made it reflect my changes again…

This post has some time but maybe someone else starts with this problem and it’s really annoying trying to update everything in your dependencies, when there’s nothing else to update, or remove node_modules.

How this happened? I really, but really don’t know, suddenly it just stopped reflecting changes. But this fixed it.