BVM is a version manager for Bit.
Using BVM makes it easier to install and manage multiple versions of Bit in a single environment.
- Consistent installation: All Bit dependencies are bundled together to ensure a consistent and predictable package installation that is not affected by SemVer rules.
- Fast installation: A simple and quick installation process that requires no additional time-consuming operations (post-install scripts, etc.)
- Friendly UX: Easy upgrades and version management
- Multiple Bit versions: Easily switch between Bit versions or even use multiple versions in parallel
npm i -g @teambit/bvmpnpm add -g @teambit/bvmyarn global add @teambit/bvmbvm installbvm install <bit-version>Install the latest version and remove the version previously used.
bvm upgradebvm -vbvm list --remoteSwitch the currently used bit version
bvm use <bit-version>Get the local used versions, local latest versions and remote latest versions of Bit and BVM
bvm versionbvm listbvm remove <bit-version>Link a command name to a Bit version (link to binaries in the PATH variable).
bvm link <command> <bit-version>For example, the following line will link Bit's version 0.0.315 to the bitty command name
(this will execute Bit's version 0.0.315 whenever the bitty command is used).
bvm link bitty 0.0.315
Validate the link by checking the version number of the new link:
$ bitty -v
0.0.315 (@teambit/legacy: 1.0.28):::info Auto-Link Bit's latest version to bbit
If a legacy version of Bit (Bit v14) is installed on your machine,
BVM will automatically link the latest version to bbit (instead of bit) to allow you to use both versions in parallel.
:::
Make sure to set an env variable named BVM_GLOBALS_DIR.
Bvm will create its config in this folder, and will set the BVM_DIR inside the config to this folder as well.
-
DEFAULT_LINK- The default command name to be linked to BVM's latest version.
bitis linked by default unless a legacy version of Bit is installed. In that case,bbitwill be linked, instead. -
BVM_DIR- The location for BVM (this will no apply for the config of bvm itself, as it's configured inside the config) In order to change the entire folder include config, use theBVM_GLOBALS_DIRenv variable described above.
bvm configbvm config set <property> <new-value>For example, to change the default link for Bit, from bit to bitty:
bvm config set DEFAULT_LINK bittyThe error message:
global Bit install location was not found in your PATH global variable.
please add the following command to your bash/zsh profile then re-open the terminal:
export PATH=$HOME/bin:$PATH
Solution:
Run the following command:
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc && source ~/.bashrcRun the following command:
echo 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc && source ~/.zshrcThe error message:
global Bit install location was not found in your PATH global variable.
please run the following command and then re-open the terminal:
setx path "%path%;C:\Users\USER\AppData\Local\.bvm" and re-open your terminal
Solution:
Run the following command:
setx path "%path%;%LocalAppData%\.bvm"If you're running VSCODE - restart it (learn why here).
Apache License, Version 2.0