fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Uh. Why in the world does installing NPM bring with it a bunch of X11 stuff??

@mort apt's default behavior of automatically installing recommended packages strikes again. Seeing if I can trace it back to a specific recommended package. Node.js and npm certainly don't require X11.

@mort It seems the culprit is that nnpm recommends node-tap (some testing thing), which depends on some X11 and XDG stuff, which pulls in more X11 stuff via recommendations.

Anachron :void:

@matt @mort why does it automatically do this? This is insane. Why cant package managers actually do what they're told?

I could understand if it were to "recommend" some packages, but automatically installing them alongside?

I'm happy I am not using apt.

@Anachron @matt @mort I think this is probably Ubuntu-specific.

I'm using Debian with apt and haven't run into such problems ever.

@emilis @Anachron @mort In my experience, apt installs recommended packages by default on both distros. The solution is the --no-install-recommends command-line option. I think you can also make that the default in a config file somewhere.

@matt @Anachron @mort You are right.

It even tried installing x11 packages on a Raspbian server.

Now I wonder what other garbage I got installed with other packages.

Anyway, as a seasoned JS developer I recommend downloading archives from nodejs.org/en/download directly, extracting them in a local directory and symlinking the 3 binaries (node, npm, npx) into your PATH.

nodejs.orgNode.js — Download Node.js®Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.