The Messenger of Allah (ﷺ) cursed women who visit graves, those who built mosques over them and erected lamps (there).
Sunan Abi Dawud Book 21, Hadith 148