Terminal says fvm: command not found after installing FVM
-bash: fvm: command not foundShort answer
The shell cannot find an fvm executable. Either FVM was never installed, or you installed it with dart pub global activate and the pub cache bin folder, $HOME/.pub-cache/bin on macOS and Linux, is not on your PATH. Install it with Homebrew or pub, then add that folder to PATH and open a new terminal.
Fix it fast
1Find out which cause you have
Find out whether the executable exists anywhere and whether the pub cache folder is on your PATH.
ls "$HOME/.pub-cache/bin" echo "$PATH" | tr ':' '\n' | grep pub-cache2Match what you see, then jump to its fix
What does the error look like?
-bash: fvm: command not foundzsh: command not found: fvm
Cause 1 of 2
FVM was installed with pub, but the pub cache bin folder is not on PATH
1Check
An activated Dart package only runs by name when the pub cache bin directory is in PATH. Confirm that the folder is missing from the list.
echo $PATH2Fix
Add the folder to the startup file of your shell (for example ~/.zshrc or ~/.bashrc), then open a new terminal. On Windows the folder is %LOCALAPPDATA%\Pub\Cache\bin.
echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.zshrc
source ~/.zshrc3Verify
The command now resolves to the pub cache copy.
which fvm
fvm --versionConfirmed by dart.dev
Cause 2 of 2
FVM is not installed at all
1Check
Search for the package in the global pub list. An empty result means it was never activated.
dart pub global list2Fix
Install it with one of the two methods on the project's pages: Homebrew (brew install fvm), or pub. After the pub route, apply the PATH fix above.
brew install fvm
# or
dart pub global activate fvm3Verify
Open a new terminal and ask for the version.
fvm --versionConfirmed by pub.dev
How do I stop it coming back?
- Put the pub cache bin folder on PATH once, in your shell startup file, so every global Dart tool works.
- Prefer one install method for FVM and note it in the project README.
- After editing a startup file, open a new terminal or run source on the file.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
Related fixes
Mobile apps
The terminal cannot find the flutter or dart command
zsh: command not found: flutter
The flutter and dart programs both live in the bin folder of the Flutter SDK, so one PATH entry gives you both.
3 causes, each with a fixMobile apps
Terminal says pub: command not found after installing Dart
dart: command not found
The standalone pub program no longer exists in current Dart.
2 causes, each with a fixMobile apps
flutter doctor warns that dart on your path is not in the Flutter SDK
Consider adding C:\flutter\bin to the front of your path.
flutter doctor found a dart program on your PATH that lives outside the Flutter SDK folder, usually a separate Dart SDK installed earlier in the list.
3 causes, each with a fixMobile apps
flutter doctor fails the Network resources check
A cryptographic error occurred while checking
The Network resources check sends a request to a fixed list of hosts and fails if one does not answer.
2 causes, each with a fixMobile apps
A Flutter command says it cannot find pubspec.yaml
This command should be run from the root of your Flutter project.
Flutter and Dart read pubspec.yaml from the current working directory.
3 causes, each with a fixMobile apps
Running flutter prints 'Error: Unable to find git in your PATH'
Error: The Flutter directory is not a clone of the GitHub project.
The flutter launcher script runs git before anything else.
3 causes, each with a fix