-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Add a function to automatically switch node version according to the project root configuration file. #42194
Comments
I think it is better to implemented in a node version manager like nvm. One node would not know where other nodes are installed. |
I agree, this will be very helpful. I work too with many versions of node with different projects. |
@nodejs/version-management |
I've tried transferring this to the version-management repo twice now and it keeps getting stuck. I've waited a while and will try one more time, but if it doesn't work, I'll leave it here in the node repo.... |
nodejs/version-management#28 does seem to exist; maybe GitHub’s having trouble. |
Nah, that's what happens each time. It gets as far as the first comment and then stops, seemingly forever. This will have higher visibility in this repo anyway, so let's just have the conversation here, I guess. (EDIT: Or somehow manually transfer it but quoting everything relevant in a comment. But I think leaving it here is fine.) |
There is Volta that can do this, if I understand your issue correctly. https://docs.volta.sh/guide/understanding#managing-your-project |
Either way, I think this should be closed; there's a lot of challenges and prerequisites to node doing version management, and "a configuration file" is also difficult because there's not yet any specification for intersection semantics for "how to describe a version". https://github.com/nodejs/version-management is the place to discuss this, and there's existing issues doing so for those interested to read. |
I agree with @ljharb - this issue should be closed in favor of discussion on more appropriate forums. The original post specifically calls out NVM for Windows (nvm-windows), so anyone coming across this from Google who wants this functionality on Windows is welcome to discuss it at https://github.com/coreybutler/nvm-windows (discussion board is best). There are many nuances to contend with on Windows. |
OK, I'm going to close this but also encourage the original poster and anyone else interested to find existing issues or open new issues in https://github.com/nodejs/version-management to discuss this further. Thanks, everyone! |
Related links Discussion on a standard location for where node versions are installed: Discussion on a standard for specifying the node "version": Applications in the wild which use |
To the OP's original request, this is exactly what nodenv does already. Invocations of node and node's executables (via global node_modules) are routed to the desired node version by the presence of |
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
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
The text was updated successfully, but these errors were encountered: