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 $\beta^-$ particle in the process.
$n\rightarrow p+e^{-}$
The $\beta^-$ 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.