Heath123 / pakkit

MIT License
504 stars 27 forks source link

Strictly enforce the node version required #101

Closed andrewhood125 closed 10 months ago

andrewhood125 commented 1 year ago

This is helpful to avoid node versions that will fail. With loud npm install output, warnings can go unseen. With this change because of the engine requirements specified upstream by the minecraft-protocol package if someone attempts to npm install with an unsupported version of node the process will abort with an error.

Screenshot 2023-08-19 at 5 41 29 PM
Heath123 commented 10 months ago

Wait, but this also blocks newer Node versions that seem like they should work fine?

andrewhood125 commented 10 months ago

@Heath123 it works similar to how versions are set in the package.json. You can give a range >=16, a list 16 || 18 etc.

I just checked out the main branch and it looks like the version of @azure/msal-node specifies a engine requirement here:

https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/011c397e3e815709e9b108eed660b993239f9a49/lib/msal-node/package.json#L66

That is what is currently stopping node v20 for being valid for example. The latest version of that package does not have that engine requirement. I'm not sure what all upgrading packages would entail but that should solve the issue of not being able to run the latest node versions.