2

I'm trying to install FVM with choco install fvm and getting an error as can be seen in the image link.

It says the installation is complete BUT when I try to run fvm I get the following error:

Cannot find file at '..\lib\fvm\bin\fvm.exe' (C:\ProgramData\chocolatey\lib\fvm\bin\fvm.exe). This usually indicates a missing or moved file.

I copied the fvm.exe file from C:\ProgramData\chocolatey\bin into C:\ProgramData\chocolatey\lib\fvm\bin\fvm.exe but it didn't solve the problem.

dart command is working properly, so I can say it was successfully installed through the proccess, but fvm wasn't. My PATH env variables are like this

I tried going through the installation proccess all over again, including readding the path variables, but it didn't work. Also rebooted the computer a couple of times through the proccess but I can't seem to find an answer to this specific problem nor did I find the solution, can you guys please help? I can provide extra info if needed.

  • So, it looks like the package compiles fvm and then creates a shim (using `Generate-BinFile`). You can see that on the last two lines of the `chocolateyInstall.ps1` file. However, based on the output in the image you provide, it seems like the compile step is failing - but the shim is being added anyway. You would need to troubleshoot why fvm is failing to compile on your system, and the package should then successfully "install". Have you tried an older version of the fvm package, to ensure it's not a issue with the latest version? – James Ruskin Mar 06 '23 at 16:05
  • The package compiles/installs on a sandbox machine I'm testing on (using a fresh installation of dart-sdk 2.17.5), so it may be something in your local dart install. – James Ruskin Mar 06 '23 at 16:11
  • Hey James, thx for the fast answer! Taking your info into consideration I found a workaround, I downloaded the last Windows relase from https://github.com/fluttertools/fvm/releases and set a Path variable to where it was located, then rebooted my PC and it worked, finally. Will add this as a comment so that it can help other people with the same problem :). – Jonatas Almeida Mar 06 '23 at 16:16

1 Answers1

3

Try to delete the flutter paste, and remove the flutter path variables, after this try to install again using "choco install fvm --force" in adm mode, it work's for me !