It is narrated from Hazrat Anas (may Allah be pleased with him) that before the construction of the Prophet’s Mosque, the Prophet (peace and blessings be upon him) used to offer prayers in a goat enclosure as well.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12335