Sunan an-Nasa'i, Book 21, Hadith 230 (In-Book) ⓘ
It was narrated from Aishah that the Prophet said: "May Allah curse people who take the graves of their prophets as Masjids."
أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ، حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ قَتَادَةَ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، عَنْ عَائِشَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " لَعَنَ اللَّهُ قَوْمًا اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسَاجِدَ " .
also referenced under: Hadith 2046 (Reference) & Volume 3, Book 21, Hadith 2048 (DarusSalam)