Skip to content

EOL package removal for nodejs-16_x causes hard failures without deprecation path #357971

@markshust

Description

@markshust

Describe the bug

The removal of nodejs-16_x with a direct throw statement causes existing configurations to fail abruptly without providing a deprecation warning or migration path. This breaks the principle of graceful degradation and makes upgrades more difficult than necessary.

Steps To Reproduce

  1. Have a configuration that uses pkgs.nodejs-16_x (common in templates like Symfony Flex's devenv)
languages.javascript = {
  enable = lib.mkDefault true;
  package = lib.mkDefault pkgs.nodejs-16_x;
};
  1. Run any nix command that evaluates this configuration
devenv up
  1. Encounter hard failure:
error: nodejs_16 has been removed as it is EOL.

Expected behavior

When encountering an EOL package:

  1. Show deprecation warnings before removal
  2. Provide clear upgrade paths in messages (e.g., "Please upgrade to nodejs_18 or nodejs_20")
  3. Consider graceful fallback to latest LTS version (Node.js 20)
  4. Only throw hard errors after sufficient deprecation period

Screenshots

N/A

Additional context

This affects many existing templates and configurations in the ecosystem:

  • Symfony Flex's current devenv template
  • Potentially other project templates using Node.js 16
  • Custom user configurations

The current approach of immediate throw creates unnecessary friction during upgrades and goes against standard package management practices of graceful deprecation.

Current implementation in nixpkgs:

nodejs_16 = throw "nodejs_16 has been removed as it is EOL.";

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.6.0, macOS 14.6.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.25.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Notify maintainers

@edolstra @NixOS/nodejs-maintainers


Note for maintainers: Please tag this issue in your PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions