[DRE-maint] Fwd: nodejs: /usr/local on default global module paths ?

Jérémy Lal kapouer at melix.org
Sat Jun 23 19:50:43 BST 2018


Forwarding to Ruby maintainers, since they faced more or less the same
issue...
Any input is welcome.

---------- Forwarded message ----------
From: Jérémy Lal <kapouer at melix.org>
Date: 2018-06-21 22:54 GMT+02:00
Subject: nodejs: /usr/local on default global module paths ?
To: Debian Javascript Maintainers <
pkg-javascript-devel at lists.alioth.debian.org>


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...)

Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20180623/57b899b0/attachment-0001.html>


More information about the Pkg-ruby-extras-maintainers mailing list