Closed sandermarechal closed 1 month ago
It would be great if I can do something like volta use system
or something
Hi @sandermarechal, Volta should already fall back to the system Node if there isn't a pinned version. The current process for determining which Node version to use is:
package.json
, use that.volta install
)So if you haven't set a Volta default with volta install node@<version>
, then that should already be the behavior. If you have set one, we don't currently have a CLI way to unset it, however you should be able to do it manually be deleting the file $VOLTA_HOME/tools/user/platform.json
. You can also use Volta as the default "system" Node in those situations, updating the version by running volta install node@<version>
when needed. (Note: We know that install
is a poor verb for the command that actually selects a default version, I have an RFC up right now to change that to make it more intuitive & clear).
If you don't want to remove the default or use Volta-managed default, there is also an environment variable VOLTA_BYPASS
that you can set to 1
in order to effectively bypass all of Volta's logic. In that case, however, it will always use the system default and won't even look for a pinned version in package.json
.
Do any of those approaches work for you?
Hi @charlespierce. We just used volta to install the same node version as the system version and use it as default, and only put the updated node version in the package.json of the new branch. That worked fine for our purposes. Thanks!
I am working on adding Volta in a project. But it's going to take time. So one branch of my project uses Volta with a new Node version, but all the other branches need to use the system version of Node. How can I unload or un-use the Volta version when I switch branches?