nodejs / version-management

Discussion Group for Version Management
MIT License
42 stars 14 forks source link

Proposal: Add a function to automatically switch node version according to the project root configuration file. #28

Closed kiccer closed 2 years ago

kiccer commented 2 years ago

What is the problem this feature will solve?

I am using Node on windows 10 and I maintain several projects with different versions of Node. I have installed NVM to control the Node version, which is convenient but not enough. It would be nice if Node versions could be switched automatically according to the project!

What is the feature you are proposing to solve the problem?

I have an idea, which I don't know if it's possible to implement, and it goes like this

When a program calls Node, this shell will first determine whether the program is in the root directory with a configuration file specifying the Node version, and if so, the corresponding version of Node will be used, otherwise the globally specified Node version will be used.

I guess this feature will help a lot of people to improve their work efficiency, and I look forward to getting attention for this requirement, tks.

What alternatives have you considered?

No response

Ayase-252 commented 2 years ago

I think it is better to implemented in a node version manager like nvm. One node would not know where other nodes are installed.

Trott commented 2 years ago

Transferring seems to be stuck. I'm going to close this and we'll just leave it in the node main repo.