  Determination of fundamental parameters of stars impacts all fields of
astrophysics, from galaxy evolution to constraining the internal structure of
exoplanets. This paper presents a detailed spectroscopic analysis of Barnard's
star that compares an exceptionally high-quality (an average signal-to-noise
ratio of $\sim$1000 in the entire domain), high-resolution NIR spectrum taken
with CFHT/SPIRou to PHOENIX-ACES stellar atmosphere models. The observed
spectrum shows thousands of lines not identified in the models with a similar
large number of lines present in the model but not in the observed data. We
also identify several other caveats such as continuum mismatch, unresolved
contamination and spectral lines significantly shifted from their expected
wavelengths, all of these can be a source of bias for abundance determination.
Out of $>10^4$ observed lines in the NIR that could be used for chemical
spectroscopy, we identify a short list of a few hundred lines that are
reliable. We present a novel method for determining the effective temperature
and overall metallicity of slowly-rotating M dwarfs that uses several groups of
lines as opposed to bulk spectral fitting methods. With this method, we infer
$T_{eff}$ = 3231 $\pm$ 21 K for Barnard's star, consistent with the value of
3238 $\pm$ 11 K inferred from the interferometric method. We also provide
abundance measurements of 15 different elements for Barnard's star, including
the abundances of four elements (K, O, Y, Th) never reported before for this
star. This work emphasizes the need to improve current atmosphere models to
fully exploit the NIR domain for chemical spectroscopy analysis.
