Nuclear stability depends upon the ratio of neutron to proton. If the n/p ratio is more than the critical value, then a neutron gets converted into a proton forming a β− particle in the process. n→p+e−
The β− particle (e− ) is emitted from the nucleus in some radioactive transformation. So electrons do not exist in the nucleus but they result in some nuclear transformation.