Skip to content

Update Request: package npm_12 independently from Node.js #557649

Description

@yzx9

Nixpkgs version

  • Unstable (26.11)

Package name

npm

Upstream version

12.0.2

Nixpkgs version

11.17.0

Changelog

https://github.com/npm/cli/blob/latest/CHANGELOG.md

Additional context

Currently, npm in nixpkgs is provided as an output of the corresponding Node.js package, so the available npm version follows the version bundled by Node.js upstream.

This can make it difficult to use a newer npm release independently. npm 12 will not be included in Node.js 26. Consequently, npm 12 will not be available in nixpkgs until Node.js 27 is released (ETA: May 2027). This is particularly relevant because npm 12 includes important updates (e.g. allow-scripts related security config, stable linked install strategy).

Would it make sense to provide npm as a standalone package (for example, npm_12 or npm_latest) that can be used together with nodejs-slim?

A possible use case would be:

packages = [
  pkgs.nodejs-slim_26
  pkgs.npm_12
];

Notify maintainers

@aduh95


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.6.topic: nodejsNode.js is a free, open-source, cross-platform JavaScript runtime environment9.needs: package (update)This needs a package to be updated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions