  Rare-earth nickelates are strongly correlated oxides displaying a
metal-to-insulator transition at a temperature tunable by the rare-earth ionic
radius. In PrNiO$_3$ and NdNiO$_3$, the transition is very sharp and shows an
hysteretic behavior akin to a first-order transition. Both the temperature at
which the transition occurs and the associated resistivity change are extremely
sensitive to doping and therefore to off-stoichiometry issues that may arise
during thin film growth. Here we report that strong deviations in the transport
properties of NdNiO$_3$ films can arise in films grown consecutively under
nominally identical conditions by pulsed laser deposition; some samples show a
well-developed transition with a resistivity change of up to five orders of
magnitude while others are metallic down to low temperatures. Through a
detailed analysis of \textit{in-situ} X-ray photoelectron spectroscopy data, we
relate this behavior to large levels of cationic off-stoichoimetry that also
translate in changes in the Ni valence and bandwidth. Finally, we demonstrate
that this lack of reproducibility can be remarkably alleviated by using
single-phase NdNiO$_3$ targets.
