<div dir="ltr">Forwarding to Ruby maintainers, since they faced more or less the same issue...<div>Any input is welcome.</div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Jérémy Lal</b> <span dir="ltr"><<a href="mailto:kapouer@melix.org">kapouer@melix.org</a>></span><br>Date: 2018-06-21 22:54 GMT+02:00<br>Subject: nodejs: /usr/local on default global module paths ?<br>To: Debian Javascript Maintainers <<a href="mailto:pkg-javascript-devel@lists.alioth.debian.org">pkg-javascript-devel@lists.alioth.debian.org</a>><br><br><br><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/<wbr>modules.html#modules_loading_<wbr>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><span class="HOEnZb"><font color="#888888"><div><br></div><div>Jérémy</div><div><br></div></font></span></div>
</div><br></div></div>