npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.5k stars 3.19k forks source link

feat: env install node #7905

Closed elrrrrrrr closed 1 week ago

elrrrrrrr commented 1 week ago

Hi, we're looking to dynamically configure Node.js versions within a single install process by nodejs npm package

Currently, Arborist read the read-only process.version. Could we please merge the dynamic nodeVersion setting from npm-install-checks into Arborist?

This would allow us to avoid extra subprocesses and align with the configurability of other properties like os and cpu.

🙏🏻🙏🏻🙏🏻

References

wraithgar commented 1 week ago

This is not the appropriate place to do this. It either needs to happen in whatever you're using that imports arborist, or as a flag to npm itself. The code you linked is not looking at process.env, but in the "current environment" as passed in from npm via its config.