[Pkg-javascript-devel] nodejs: /usr/local on default global module paths ?

Bastien ROUCARIES roucaries.bastien at gmail.com
Sun Jun 24 09:30:59 BST 2018


Hi,



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

perl by memory search /usr/local

In all the case it is an implementation detail. could we go ahead with
this patch quickly without /usr/local and backport my patch to 8.0

I will add a lintian patch in order to detect /usr/lib/nodejs

Bastien
>
> Jérémy
>
>
> --
> Pkg-javascript-devel mailing list
> Pkg-javascript-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel



More information about the Pkg-javascript-devel mailing list