Since old compiled files are not deleted when recompiling the static middleware will serve the old file if compilation of the new file fails, which leads to confusion when developing while not paying close attention to the log.
One fix would be to delete the stale compiled file before trying to compile the new file.