0

I installed FVM, but it only works in CMD/Power Shell and only when i run it as an Administrator If I try to do a command as an admin, the CMD shuts down. On an another note, the Power Shell gives me the code line

"Error: Unable to find git in your PATH"

when i try to do a command in it. The same thing happens when i try to use dart commands too.

Can someone help me?

enter image description here

I expected using flutter commands in the terminal without run as admin.

inkredusk
  • 919
  • 4
  • 16
  • I'm strongly recommending https://puro.dev/ over fvm now, having used FVM for a while, and now puro. Puro works more closely with the IDEs, and can even help you with your initial flutter install, updating your login scripts to include the necessary directories. – Randal Schwartz Apr 23 '23 at 06:42

1 Answers1

0

the solution I found was in the Visual Studio Code settings JSON file. You need to remove the existing configuration and add a new one to make it work with FVM. Remove the following configuration: json

{
  "dart.flutterSdkPath": ".fvm/flutter_sdk",
  "search.exclude": {
    "**/.fvm": true
  },
  "files.watcherExclude": {
    "**/.fvm": true
  }
}

And add the following configuration to make it work with all the versions you have downloaded with FVM: json

{
  "dart.flutterSdkPaths": ["/Users/usr/fvm/versions"]
}

Make sure to replace "/Users/usr/fvm/versions" with the actual path to the "versions" folder where FVM stores the downloaded Flutter versions on your system. This configuration change will allow Visual Studio Code to recognize and use the Flutter versions managed by FVM. You can find more information about this configuration on the FVM website at

https://fvm.app/docs/getting_started/configuration/. I hope this helps!