Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current file is not on project root or not on lib folder? (MacOS Big Bug, I mean, Big Sur) #31

Open
JCKodel opened this issue Dec 11, 2020 · 4 comments

Comments

@JCKodel
Copy link

JCKodel commented Dec 11, 2020

Error every time I save pubspec.yaml:

Current file is not on project root or not on lib folder? File must be on $root/lib.
Your current file path is: '/Users/jckodel/Desktop/MeuCronogramaCapilar/frontend/pubspec.yaml' and the lib folder according to the pubspec.yaml file is '/Users/jckodel/Desktop/MeuCronogramaCapilar/frontend/lib'.

image

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] VS Code (version 1.51.1)
@luanpotter
Copy link
Member

Are you trying to format the pubspec file itself? You should be formatting *.dart files inside the lib folder

@petrnymsa
Copy link

@luanpotter Hence the OP didn't answer. Dart-import is triggered also for pubspec.yaml therefore this error comes up

@cklanac
Copy link

cklanac commented Sep 4, 2021

This error is also triggered when saving analysis_options.yaml and the Dart Import: Fix On Save option is checked.

@wangmir
Copy link

wangmir commented Dec 9, 2021

It seems this error is triggered when the project contains multiple dart projects too. My current source tree is constructed with multiple dart projects at the same project, and it contains multiple libs under their individual project directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants