Flutter - Flutter Version Management (fvm) package not working in windows
Solution 1
try :
pub global run fvm:main
pub global run fvm:main use VERSION
Solution 2
Hi adding in your path:
%LOCALAPPDATA%\Pub\Cache\bin
More info:
https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path
Jay Mungara
A passionate app developer. I'm learning new programming things and exploring coding fundamentals to grow my computational skills. I'm 63rd person to earn flutter technology silver badge I'm 71st person to earn flutter technology bronze badge. I'm 125th person to earn dart technology bronze badge.
Updated on June 17, 2022Comments
-
Jay Mungara almost 2 years
I just added the the fvm package to switch the flutter channel from stable to master without downloading sdk components every time when switching flutter channels.
I have followed the step written in readme.md for switching the channel.
I have set the following path in my environment variables.
D:\Program_Files\FlutterSDK\SDK\flutter\bin; D:\Program_Files\FlutterSDK\SDK\dart-sdk\bin; C:\Users\User\AppData\Roaming\Pub\Cache\bin;
Now, i have opened my first project in which i want to use "flutter SDK's master channel". But, whenever i try to use the command "fvm use master". It's not working.
It is giving me an error like, 'fvm' is not recognized as an internal or external command,
So, can anyone suggest a solution?
Thanks.
-
Abhilash Chandran almost 4 yearsHope you activated the package, using
pub global activate fvm
-
Jay Mungara almost 4 yearsYes i did it already.
-
Abhilash Chandran almost 4 yearsHere are the options I would try. 1. If you are in windows 10 you can try
refreshenv
. 2. If you are using android studio closing the terminal and restarting by invalidating and clearing the cache could help. 3. Also you can try running likepub global list
to make sure it contains fvm. -
Abhilash Chandran almost 4 yearsMaybe silly but make sure
C:\Users\User\AppData\Roaming\Pub\Cache\bin;
user
in this path refers to your username. :) -
Jay Mungara almost 4 yearsYes did it as well
-
-
Minh Nguyen almost 3 yearsWhy fvm command not work in VSCode, but work in the terminal application?
-
fatiu almost 3 yearsVscode terminal has probably not refreshed. You do source ~/.bashrc or source ~/.zshrc to refresh