File: nodejs.README.Debian

package info (click to toggle)
nodejs 20.19.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 219,072 kB
  • sloc: cpp: 1,277,408; javascript: 565,332; ansic: 129,476; python: 58,536; sh: 3,841; makefile: 2,725; asm: 1,732; perl: 248; lisp: 222; xml: 42
file content (29 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
nodejs for Debian
=================

CommonJS global folders
-----------------------

Documentation at:
file:///usr/share/doc/nodejs/api/modules.html#loading-from-the-global-folders

The documentation explains that CommonJS module eventually looks into `$PREFIX/lib/node`.

However in Debian, modules are installed in different paths, so the global folders
have been modified to instead end up searching into:

    * "/usr/lib/<$DEB_HOST_MULTIARCH>/nodejs" for c++ addons
    * "/usr/share/nodejs" for pure javascript modules


ES6 Modules
-----------

Documentation at:
file:///usr/share/doc/nodejs/api/esm.html#terminology

There is no global lookup with ESM.

One can easily symlink globally-installed modules into a local package using
"pkgjs-install-minimal" from the dh-nodejs debian package.