Using BVM
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#
- NPM
- Yarn
npm i -g @teambit/bvmyarn global add @teambit/bvmIf BVM isn't recognized in your terminal after installing it via npm, then please run the following:
- MacOS / Linux
- Windows
- Bash
- ZSH
# npm echo 'export PATH=$(npm bin -g):$PATH' >> ~/.bashrc && source ~/.bashrc# yarnecho 'export PATH=$(yarn global bin):$PATH' >> ~/.bashrc && source ~/.bashrc# npm echo 'export PATH=$(npm bin -g):$PATH' >> ~/.zshrc && source ~/.zshrc# yarnecho 'export PATH=$(yarn global bin):$PATH' >> ~/.zshrc && source ~/.zshrcsetx path "%path%;%AppData%\npm" and re-open your terminalIf you get the following error while installing bit via BVM:
- MacOS / Linux
- Windows
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:$PATHglobal 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 terminalSolution:
Run the following command:
- MacOS / Linux
- Windows
- Bash
- ZSH
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc && source ~/.bashrcecho 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc && source ~/.zshrcsetx path "%path%;%LocalAppData%\.bvm"Install Bit#
Install Bit's latest version
bvm installUpgrade Bit's version
bvm upgradeUsing 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>Manage versions#
Get version information
bvm versionList available versions
bvm list --remoteList installed versions
bvm listRemove a local version
bvm remove <bit-version>BVM configurations#
BVM has several configurations
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
Get BVM configurations
bvm configSet BVM configurations
bvm config set <property> <new-value>