Hi,

i've now been using nodejs in debian for a while, deploying debian packages
using nodejs, and also deploying user packages which do not want to fall
back
on system-installed modules (because of subtle discrepancies in the way
they're crafted).
Usually it goes well, but when it gets bad, it's really hard to debug that
the cause
of the issue comes from a system-installed node module, when you believed
you
have been using a local node_modules-installed package.
That's why i really want to offer an explicit way of choosing how modules
are
resolved. I believe the nodejs package.json semantics are already enough to
propose a straightforward and reliable default behavior.
Something like:
- when node script doing "require('thatmodule')" is run from /usr/share or
/usr/lib*,
only allow system-installed packages
- when node script is run from elsewhere (and has a node_modules directory
that is
not the system path), stick to the standard upstream-designed node_modules
resolution:
never ever use system-installed modules. That doesn't forbid using them, it
just requires
an extra symlink if one really wants to.

Please ±1

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

Reply via email to