When the figure said to Joshua, "Are you for us?" he began to cry out from beneath the soles of his feet. He said to him: Twice I have come to give Israel possession of the Land. I came in the days of Moses your teacher, and he pushed me away, as it is said, "Now I have come" (Joshua 5:14) [implying: but earlier I came too]. Yet Moses pushed me away, as it is said, "If Your presence does not go with us, do not carry us up from here" (Exodus 33:15).
The Angel Who Came Twice to Give Israel Their Land
Yalkut Shimoni on Nach 15:15
כיון שאמר לו הלנו אתה התחיל צועק מתחת צפרני רגליו א"ל שני פעמים באתי להנחיל את ישראל את הארץ, באתי בימי משה רבך ודחה אותי, שנאמר עתה באתי אבל משה דחה אותי, שנאמר אם אין פניך הולכים אל תעלנו מזה: