On Sun, Apr 12, 2026 at 03:42:29PM +0100, Benny Siegert wrote:
I am using a few command-line tools that are meant to be installed with "npm
install". If I use "npm install -g", the tool is installed into
/usr/pkg/bin, without being tracked by the pkgsrc infrastructure. This seems
bad.
This is much more complicated, because npm likes to install all the
dependencies for a package for each package.
Take a look at wip/prettier for a working npm package.
I didn't take this further because many packages directly or
indirectly depend on non-portable software that needs to be compiled,
and since every npm package pulls in its own copy, the patches for
this need to be distributed all over.
It would be nice to have an npm that installs into a common prefix and
all packages using a dependency could use it from there, but that is
just not the npm that exists.