nix-community / napalm

Support for building npm packages in Nix and lightweight npm registry [maintainer=?]
MIT License
104 stars 17 forks source link

Fixed lock-patcher not working for older node.js versions #39

Open Mazurel opened 2 years ago

Mazurel commented 2 years ago

While using the latest version of Napalm, I have discovered that when node.js version is below 14.13.0, then it will fail running lock-patcher.mjs due to module or fsPromise support. This PR makes it so that when node.js version is below 14.13.0 it will use the latest node.js from the nixpkgs, otherwise it will use the one specified by the user.

jtojnar commented 2 years ago

Sorry, I forgot about this. Is this still needed?

Mazurel commented 2 years ago

I guess it might be useful for packaging older applications. It just caps minimum node.js version for running lock-patcher.mjs.

Btw sorry for responding so late, I have missed the notification somehow.

jtojnar commented 2 years ago

Node 14 is the oldest supported Node version so I would say people really should update if they want to use Napalm.

Mazurel commented 2 years ago

Yeah, I agree, although I made this change because I was packaging Manyverse, which uses node.js version 12, so apparently this may be an issue for someone.