Either you plan ahead and make sure you have a melee weapon or non-projectile based spell or else you can simply ignore them and run away.