Sahih al-Bukhari, Book 4, Hadith 100 (Bukhari 234)

Narrated Anas:

Prior to the construction of the mosque, the Prophet (ﷺ) offered the prayers at sheep-folds.