How to use `pnpm` with recent nodejs?

Also found out that if you’re using this kind of overlay

overlays = [ (self: prevPkgs: {
    nodejs = prevPkgs.nodejs-16_x;
}) ]

nixpkgs.nodePackages like pnpm will be using that version of nodejs:

pnpm node --version v16.17.1
1 Like