Closed dujj closed 2 weeks ago
Can you tell me the version of fvm
also run the command with the --verbose
flag as it will show which directories are looking at.
3.1.3
@dujj Can you run with the --verbose
flag so we can see the directories that is lookin into for pubspec?
@dujj Based on those logs, it seems there is an fvm config in that /work directory. So it's looking for the config file instead of the pubspec because of nested directories. Therefore, the message indicates that there is no pubspec found in the same directory where the project config is located.
Command: use
Searching for project in /Users/k/Documents/work/123/test Searching for project in /Users/k/Documents/work/123 Searching for project in /Users/k/Documents/work Found project config in /Users/k/Documents/work
No pubspec.yaml detected in this directory ✔ Would you like to continue? · yes
Updating project config Project name: work Project path: /Users/k/Documents/work
Checking .gitignore Update gitignore: true [WARN] Project is not a git repository. But will set .gitignore as IDEs may use it,to determine what to index and display on searches, .fvm/ already exists in .gitignore Resolving dependencies... Starting to update environment variables...
Running: /Users/k/fvm/versions/3.19.6/bin/flutter
✓ Dependencies resolved. (0ms)
Resolving dependencies...
meta 1.11.0 (1.12.0 available)
test_api 0.6.1 (0.7.0 available)
vm_service 13.0.0 (14.0.0 available)
Got dependencies!
3 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated
for more information.
✓ Project now uses Flutter SDK : SDK Version : 3.19.6`
see : test is new project created by flutter Searching for project in /Users/k/Documents/work/123/test Searching for project in /Users/k/Documents/work/123 Searching for project in /Users/k/Documents/work Found project config in /Users/k/Documents/work
but: Searching for project logs, show: project config in work
right: Searching for project in /Users/k/Documents/work/123/test test is project
project find failed, so all wrong
I clean work,result: fvm use 3.19.6 --verbose
Argument information: Top level options:
Command: use
Searching for project in /Users/k/Documents/work/123/test Searching for project in /Users/k/Documents/work/123 Searching for project in /Users/k/Documents/work Searching for project in /Users/k/Documents Searching for project in /Users/k Searching for project in /Users Searching for project in / No project found in /Users/k/Documents/work/123/test
Updating project config Project name: test Project path: /Users/k/Documents/work/123/test
Checking .gitignore
Update gitignore: true
[WARN] Project is not a git repository.
But will set .gitignore as IDEs may use it,to determine what to index and display on searches,
You should add the fvm version directory ".fvm/" to .gitignore.
✔ Would you like to do that now? · yes
✓ Added .fvm/ to .gitignore
✓ Project now uses Flutter SDK : SDK Version : 3.19.6
This operation was as expected
But I still don’t understand why the search is not in the current directory to determine whether there is a problem with the conditions of a project, and why it is searched recursively upwards.
@dujj I will close this issue since it seems to be working. The recursion supports workspaces and/or monorepos, so you have the same version configured for multiple projects.
Before creating a bug report please make check the following
pub cache repair
. Close the terminal and try again.administrator
or withdeveloper
permissions.fvm doctor
if possible and add the output to the issue.Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
fvm use stable
...Expected behavior A clear and concise description of what you expected to happen.
Logs Please provide the verbose logs by running
--verbose
after the command.Desktop (please complete the following information):
Additional context Add any other context about the problem here.