fix error spans for js compiler errors