In a PN-junction diode not connected to any circuit
At junction, a potential barrier/depletion layer is formed, with N-side at higher potential and P-side at lower potential. Therefore there is an electric field at the junction directed from the N-side to P-side