<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 7, 2022 at 8:33 AM Yadd <<a href="mailto:yadd@debian.org">yadd@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Package: nodejs<br>
Version: 16.13.2~dfsg-2<br>
Severity: normal<br>
<br>
Hi,<br>
<br>
starting from version 14, nodejs is able to run .mjs files. However,<br>
"import" method only works when dependency is available in node_modules<br>
directories. To avoid having to create node_modules/* links in each<br>
directory, it could be usefull to have node_modules links that points to<br>
nodejs in each /usr/(share|lib|lib/${DEB_MULTIARCH})/nodejs directory.<br>
<br>
Then only some links will be needed when a /usr/share/nodejs file tries<br>
to "import" a /usr/li/x86_64*/nodejs module.<br>
<br>
Alternative: modify nodejs to be able to search "import" modules in<br>
process.config.variables.node_relative_path<br></blockquote><div><br></div><div>I agree these should be added for native modules:</div><div>/usr/share/node_modules -> /usr/share/nodejs</div><div>and for binary modules:</div><div>/usr/lib/$(arch_triplet)/node_modules -> /usr/lib/$(arch_triplet)/nodejs</div><div><br></div><div>The case of a binary module importing a native module is trickier.</div><div>I think the javascript part of those modules should stay in /usr/share/nodejs,</div><div>and the actual compiled binary file be stored in /usr/lib/$(arch_triplet)/nodejs.</div><div><br></div><div>That way only the "binary loading" paths need a patch - which is expected, since</div><div>debian already is patching nodejs to get the correct paths from arch triplet.</div><div><br></div><div>Jérémy</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Cheers,<br>
Yadd<br>
<br>
-- <br>
Pkg-javascript-devel mailing list<br>
<a href="mailto:Pkg-javascript-devel@alioth-lists.debian.net" target="_blank">Pkg-javascript-devel@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel</a><br>
</blockquote></div></div>