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
flutter packages get not working in vs code #31115
Comments
exit code 0 indicate no errors.. |
Yes, but still the packages aren't downloaded. |
@surpriso1997 can you confirm what you mean by "the packages aren't downloaded"? Where are you looking? This operation should create (or update) a |
I'm facing the same issue. Any dependencies I include in the pubspec file doesn't seem to have any impact after doing flutter get, importing the respective packages gives a "Target of URI doesn't exist:" message. |
@Fistus is there a Can you try running the Reload Window command in VS Code (or restarting it) and see if the red squiggles go away? (There's a known issue with newly-added packages not being picked up by the analysis server). |
@DanTup There's a .packages file, however, it doesn't contain the references I had added. I tried restarting it as well. |
Can you try:
Then attach the log. |
@Fistus could you attach your pubspec.yaml file, along with the (Also, is there really a folder in your path named |
While writing import ' '; command in dart file it says target URL doesn't exist but running flutter get packages or clicking get packages in pubspec.yaml file yields exit code 0. Packages aren't downloaded in pub cache either. |
@surpriso1997 Can you try
|
install this plug in on vs-code click ctrl+shift+p connend pubspag |
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! |
I seem to experience the same bug. excerpt from pubspec.yaml
.packages:
|
@rizzek please open an issue at https://github.com/Dart-Code/Dart-Code and attach your |
@DanTup Sure, will do once I encounter this bug again. I got it to work for now with a lot of fiddling around and deleting/installing stuff. |
In my case "flutter clean" and restarting VS Studio Code fixed it. |
Remove the package(s) giving you the error from your |
I know this is way overdue but for the sake of anyone that may come after this,
|
Thanks man. Helped me and working |
thank you so much! it finally worked |
Manually managing files in your pub cache doesn't seem like a good solution. If running |
@samar-1601 someone experiencing the issue that is able to respond to questions/requests for info would be better opening the issue. There isn't enough info here to troubleshoot, so it's going to need someone to post output/files to help debug. |
I am also receiving this issue. It's been about a year, has there been a concrete fix solution yet? |
@cesolutions others reporting this above resolved their issues so it's not clear what the problem was. If you're having issues, please open a new issue with the details (and include the info mentioned in the comments above). Feel free to cc me on it. |
Since I encountered this recently, here is what causes the problem: Visual Studio Code does NOT automatically save your pubspec.yaml file when running pub get. You can fix the problem of it not getting packages by simply going to File>Save (Ctrl+S), after making changes to it, and before running pub get. |
That's correct - but by default it does the opposite - run |
I am using Android Studio and seeing this issue. I will create a new issue on here though. |
I guess everyone in this comment are genious lol.what an unnecessary way they are referring.
|
This one worked for me. After trying every solution here this one worked for me. I even uninstalled the VS code and tried reinstalling many times nothing worked for me. Even clean install of VS code not work. |
For me worked by simply Deleting |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
flutter packages get command or get packages button in vs code doesn't work. The packages are not installed but output has Exit code 0 after the execution of the command.
Steps to Reproduce
Logs
flutter packages get
Running "flutter packages get" in e_commerce_app... 0.7s
exit code 0
The text was updated successfully, but these errors were encountered: