Bit Version Manager

BVM is a version manager for Bit.
Using BVM makes it easier to install and manage multiple versions of Bit in a single environment.

Features

  • 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

Install BVM

Install with npm:

npm i -g @teambit/bvm
CopiedCopy

Install with Yarn:

yarn global add @teambit/bvm
CopiedCopy

BVM versions older than 0.2.1 will not install Bit versions newer than 0.0.870. If you have an older version of BVM, please update it (see the installation instructions above).

Install Bit

bvm install
CopiedCopy
bvm upgrade
CopiedCopy

Troubleshooting

BVM is not recognized in your terminal

BVM updates your path automatically. However, this process can fail due to terminal-specific issues, permissions issues, and so on. It also might happen that BMV is not in PATH because the global npm/yarn bin folder is not in PATH. In that case you need to add them manually.

Windows

Set the location in PATH, manually.

MacOS/Linux

# npm
echo 'export PATH=$(npm bin -g):$PATH' >> ~/.zshrc && source ~/.zshrc
# yarn
echo 'export PATH=$(yarn global bin):$PATH'  >> ~/.zshrc && source ~/.zshrc
CopiedCopy
# npm
echo 'export PATH=$(npm bin -g):$PATH' >> ~/.bashrc && source ~/.bashrc
# yarn
echo 'export PATH=$(yarn global bin):$PATH'  >> ~/.bashrc && source ~/.bashrc
CopiedCopy

Global Bit install location was not found

Windows

Set the location in PATH, manually.

MacOS/Linux

Please run the following command:

echo 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc && source ~/.zshrc
CopiedCopy
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
CopiedCopy

then re-open the terminal.

Getting errors due to firewall/proxy

Depending on your proxy or firewall settings, use the following configs to have BVM use the correct proxy:

bvm config set proxy http://proxy.example.com:8080
bvm config set https_proxy https://proxy.example.com:8080;
CopiedCopy

Using v15 and v14

If you have a previous version of Bit installed (bit-bin), the default binary name for v15 will be bbit.

You can change the binary name for Harmony by running the following command after installing BVM and before installing Bit.

bvm config set DEFAULT_LINK <new-value>
CopiedCopy

Manage versions

bvm version
CopiedCopy
bvm list --remote
CopiedCopy
bvm list
CopiedCopy
bvm remove <bit-version>
CopiedCopy

Install experimental releases

By default BVM installs the latest stable Bit version. To experiment with Bit's latest features, set BVM to install the latest nightly build.

bvm config set RELEASE_TYPE nightly
CopiedCopy

To undo that, and get only stable versions, remove the RELEASE_TYPE variable:

bvm config del RELEASE_TYPE
CopiedCopy

BVM configurations

BVM has several configurations

  • DEFAULT_LINK - The default command name to be linked to BVM's latest version.
    bit is linked by default unless a legacy version of Bit is installed. In that case, bbit will be linked, instead.
  • BVM_DIR - The location for BVM
bvm config
CopiedCopy
bvm config set <property> <new-value>
CopiedCopy