Giter Site home page Giter Site logo

"fvm use" doesn't work about fvm HOT 20 CLOSED

leoafarias avatar leoafarias commented on May 18, 2024
"fvm use" doesn't work

from fvm.

Comments (20)

rayliverified avatar rayliverified commented on May 18, 2024 2

@leoafarias Thanks for taking a look! I've followed the steps in the ReadMe and am running into this issue.
MaxthonSnap20191126101114
I guess I still don't fully understand how to reference a version "per project". Is this done manually via a config file or through fvm?

from fvm.

Giuliano-Stravini avatar Giuliano-Stravini commented on May 18, 2024 1

@leoafarias Not solved, but the log changed!

PS C:\projetos\vimob\vimobpoc\app> fvm list
1.10.14
1.9.1
beta
dev
PS C:\projetos\vimob\vimobpoc\app> fvm use 1.10.14
Activating 1.10.14...
⚠️  Sorry could not link C:\fvm\1.10.14\bin\flutter
PS C:\projetos\vimob\vimobpoc\app>

I already have flutter 1.10.15(dev) installed, this can be a problem?

from fvm.

rchavik avatar rchavik commented on May 18, 2024 1

It's been decades since I've used Windows, but see if this applies: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@Giuliano-Stravini thanks, I am still working through some of the kinks. I was able to replicate the issue when doing the use command on a directory that does not have fvm installed. For some reason, it doesn't fall under the same error logging logic that exists right now.

I see you are running within the app, so I will do further investigation.

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@Giuliano-Stravini Please run version 0.6.6. I just made some updates. I am not sure this will fix your issue however you should get a bit better logs once you get the issue. Do you mind sending it here?

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@Giuliano-Stravini can you run with the --verbose flag, and also have you made any changes to the config?

from fvm.

Giuliano-Stravini avatar Giuliano-Stravini commented on May 18, 2024

@leoafarias Yes, i configured the cache path

PS C:\projetos\vimob\vimobpoc\app> fvm use 1.10.14 --verbose
[     0.049s] Activating 1.10.14...
[     0.066s] FileSystemException: Cannot create link to target 'C:\fvm\1.10.14\bin\flutter', path = 'C:\projetos\vimob\vimobpoc\app\fvm' (OS Error: O cliente não tem o privilégio necessário.
, errno = 1314)
[     0.068s] ⚠️  Sorry could not link C:\fvm\1.10.14\bin\flutter
#0      linkDir (package:fvm/utils/helpers.dart:35:5)
<asynchronous suspension>
#1      linkProjectFlutterDir (package:fvm/utils/flutter_tools.dart:201:9)
<asynchronous suspension>
#2      UseCommand.run (package:fvm/commands/use.dart:33:11)
<asynchronous suspension>
#3      CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#4      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#5      new Future.sync (dart:async/future.dart:222:31)
#6      CommandRunner.run (package:args/command_runner.dart:112:14)
#7      fvmRunner (package:fvm/fvm.dart:26:23)
<asynchronous suspension>
#8      main (file:///C:/Users/giuliano.stravini/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/fvm-0.6.6/bin/main.dart:4:9)
<asynchronous suspension>
#9      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#10     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

ps: "(OS Error: O cliente não tem o privilégio necessário. errno = 1314)" = "(OS Error: the client does not have the required privilege. errno = 1314)"

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

I was able to replicate the issue of saving in my Home directory which on the Windows would be C:/ . That would cause the issue.

If you trying to store on C I believe you can just remove the cache url. I will probably add better validation for this case and will update soon

from fvm.

Giuliano-Stravini avatar Giuliano-Stravini commented on May 18, 2024

Oh i got it.

This happens in any path config. I guess i did something wrong haha

from fvm.

rayliverified avatar rayliverified commented on May 18, 2024

Thanks @leoafarias for investigating these issues. I can't wait for FVM to work as it will save me so much time.

Currently, I'm experiencing the same issue as above.

My fvm is installed in C:\Users\Laptop\fvm\versions\master\bin\flutter and not in the local project folder. From #21, I see that one way for fvm to work from inside the project? How can I set it up to work that way?

Thanks :)

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@searchy2 I think these are separate issues. The way FVM works is that you can install versions and they are cached globally. When you install the version local it references that global version.

This is important to avoid the long build processes that can happen with flutter.

Let me know if that clarifies

from fvm.

rayliverified avatar rayliverified commented on May 18, 2024

@leoafarias I'm sorry that I don't fully understand and need some additional clarification.
How do you install FVM locally? Right now, I've ran pub global activate fvm. Do I need to install it in my project folder somehow?

Thanks 🥇

from fvm.

CaiJingLong avatar CaiJingLong commented on May 18, 2024

@leoafarias I'm sorry that I don't fully understand and need some additional clarification.
How do you install FVM locally? Right now, I've ran pub global activate fvm. Do I need to install it in my project folder somehow?

Thanks 🥇

https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@searchy2 sorry for the delay responding. The SDK versions are installed "globally" This is important because if you have multiple projects using the same version it reuses instead of having them multiple times. As you probably know they get pretty large.

So the versions are "cached" globally, but they get referenced per project. So a project can reference any of the globally cached versions.

You should be able to install and do everything you need based on the instructions on the readme file. Please let me know if there is anything that is not clear so I can clean up.

from fvm.

rchavik avatar rchavik commented on May 18, 2024

AFAIK, fvm will create a symlink (or its equivalent) in the directory you ran fvm use. Not sure how it is in windows, but in linux i typically invoke fvm (after fvm use) via the following ./fmv <command>. Note the ./ to implicitly invoke the fvm file in the current directory.

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@searchy2 I suggest reading the instructions on the readme if you are still having issues. You will have to install the flutter version first. I will be adding a better description and maybe a prompt to install the version

from fvm.

humazed avatar humazed commented on May 18, 2024

I'm having the same issue as @searchy2

from fvm.

rayliverified avatar rayliverified commented on May 18, 2024

Thanks for the suggestion @leoafarias
Unfortunately, I still run into the link issue.
MaxthonSnap20200102152737

from fvm.

leoafarias avatar leoafarias commented on May 18, 2024

@searchy2 version 0.6.7 has some fixes for windows that I think it might address your issue. Would you mind testing with that version?

from fvm.

kwado-tech avatar kwado-tech commented on May 18, 2024

To create a symlink, fvm requires administrative rights. You can open a terminal with administrative rights and cd project-root-directory and run fvm use [flutter version]

from fvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.