Problem with fvm installation on windows 10 (choco install fvm)
Asked Answered
V

2

5

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.

Venetian answered 6/3, 2023 at 15:39 Comment(3)
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?Waylin
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.Waylin
Hey James, thx for the fast answer! Taking your info into consideration I found a workaround, I downloaded the last Windows relase from 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 :).Venetian
S
3

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

Sewan answered 30/6, 2023 at 17:22 Comment(0)
E
3

I had the same error, while I was trying to uninstall everything and start over again, used below commands and it worked.

choco uninstall fvm -y --remove-dependencies

choco uninstall fvm -n --skip-autoinstaller
Emmen answered 3/9, 2023 at 13:20 Comment(1)
I don't understand what happened but choco uninstall fvm -y --remove-dependencies worked for me. I didn't even have to install fvm after running that. I just type fvm in the terminal and it worked.Mandler

© 2022 - 2024 — McMap. All rights reserved.