<div dir="ltr">Hi,<div><br></div><div>bug #901474 asks the question of wether having nodejs load</div><div>modules found inside /usr/local (share for pure js, lib for addons)</div><div>is something to be expected by default or not.</div><div><br></div><div>Anyone can already set NODE_PATH env variable, in a somewhat</div><div>compatible way with other environments, to set a preferred path for modules.</div><div>However, as</div><div>/usr/share/doc/nodejs-doc/api/modules.html#modules_loading_from_the_global_folders<br></div><div>put it,</div>"Sometimes deployments that rely on NODE_PATH show surprising behavior when people are unaware that NODE_PATH must be set."<div>Same remark goes for whatever paths Debian may add to global modules search directories.</div><div><br></div><div>There is, however, DFHS and debian practices.</div><div>It is undiscutably needed to shift modules paths into two places:</div><div>/usr/share/nodejs for pure javascript modules</div><div>/usr/lib/<triplet>/nodejs for c++ addons</div><div><br></div><div>I'm much less convinced that it is a good idea to add corresponding /usr/local</div><div>paths to default global module paths.</div><div><br></div><div>How other languages deal with this ? (python, go, ruby, perl...)</div><div><br></div><div>Jérémy</div><div><br></div></div>