2

I am attempting to upgrade npm in nix package manager running on arch linux.

I attempt an upgrade with the following command:

nix-env -iA nixpkgs.nodePackages.npm

I get the following error:

error: packages '/nix/store/8ar86gc2f7l38kz0y9nj45mbjailkymd-nodejs-16.4.0/bin/npx' and '/nix/store/4d3b3f11qvz1rj8xgdp0adh7zc3jl5cj-node_npm-7.18.1/lib/node_modules/.bin/npx' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)

What should the INSTALLED_PKGNAME should be?

I tried the following:

error: selector '/nix/store/8ar86gc2f7l38kz0y9nj45mbjailkymd-nodejs-16.4.0/bin/npx' matches no derivations

error: selector 'npx' matches no derivations

error: selector 'nodejs-16_x' matches no derivations

error: selector 'nix-pkgs#nodejs-16_x' matches no derivations

error: selector 'node_npm-7.18.1' matches no derivations

error: selector 'nixpkgs.nodePackages.npm' matches no derivations

My nix version is: nix-env (Nix) 2.4pre20210601_5985b8b

tjb
  • 179
  • 10

1 Answers1

2

You can query the existing package derivations with nix-env -q and set your INSTALLED_PKGNAME accordingly!

enx
  • 36
  • 1