The mass defect in a nucleus is because of:
nucleons
electrons
positrons
both electrons and protons
nucleons
The Mass effect is the difference in the mass of a nucleus and the nucleons separated to infinity. So, it is the nucleons only who are responsible for the mass defect, and not the electrons.