הֲל֤וֹא צִוִּיתִ֙יךָ֙ חֲזַ֣ק וֶאֱמָ֔ץ אַֽל־תַּעֲרֹ֖ץ וְאַל־תֵּחָ֑ת כִּ֤י עִמְּךָ֙ יְהוָ֣ה אֱלֹהֶ֔יךָ בְּכֹ֖ל אֲשֶׁ֥ר תֵּלֵֽךְ׃ (פ)
Non ti ho comandato? Sii forte e di buon coraggio; non temere, non ti scoraggiare, poiché l'Eterno, il tuo DIO, è con te ovunque tu vada.'
Rashi on Joshua
I have already commanded you to be stong and courageous. This was said in reference to actual war, as it is said: ‘Have no fear or trepidation.’ Where was he commanded this? He was so commanded in the time of Moshe, as it is said: ‘and command Yehoshua son of Nun etc.’18Devorim 31:23.
Metzudat David on Joshua
I have commanded you to be strong in war opposite the enemy and to not be afraid.
Metzudat David on Joshua
It does not say "That I will be with you", even Hashem was saying this, an example of this is in Shmuel, "And he sent, and Shmuel" and the one who was speaking was Shmuel.