[Pkg-javascript-devel] Typescript and Debian directories

Yadd yadd at debian.org
Wed May 5 08:50:12 BST 2021


Hi all,

as you probably already know, Typescript has a poor module search
support. That's why pkg-js-tools supports
debian/nodejs/ext{copies,links}.

Symlinks (debian/nodejs/extlinks) would be the better solution, but when
a linked module has to include another, Typescript can't find it because
it recursively search for a node_modules directory, starting in
/usr/share/nodejs/<module>. Then each module that requires another has
to be copied (debian/nodejs/extcopies), and recursively all dependencies
(example:
https://salsa.debian.org/js-team/node-jest/-/blob/master/debian/nodejs/extcopies).

I tried to patch Typescript without success.

We could simplify this by creating "node_modules => nodejs" symlinks in
/usr/share, /usr/lib, /usr/lib/arch. Then no need to copy modules, only
few of them should be declared in debian/nodejs/extlinks.

Is it an acceptable solution ? Where to store these symlinks, nodejs or
typescript ?

Cheers,
Yadd



More information about the Pkg-javascript-devel mailing list