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

Error while running flutter pub get #1

Open
aliakbar3967 opened this issue Jul 1, 2023 · 1 comment
Open

Error while running flutter pub get #1

aliakbar3967 opened this issue Jul 1, 2023 · 1 comment

Comments

@aliakbar3967
Copy link

pub get failed
command: "C:\Users\mohda\Downloads\flutter_windows_3.7.10-stable\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub
--color --directory . get --example"
pub env: {
"FLUTTER_ROOT": "C:\Users\mohda\Downloads\flutter_windows_3.7.10-stable\flutter",
"PUB_ENVIRONMENT": "flutter_cli:get",
"PUB_CACHE": "C:\Users\mohda\AppData\Local\Pub\Cache",
}
exit code: 1

@Mohamed-Aziz-Mhadhbi
Copy link

  1. Make sure you have a stable internet connection. pub get requires internet access to download dependencies from the pub.dev package repository.
  2. Check if your Flutter SDK installation is correct and up to date. Verify that the FLUTTER_ROOT environment variable points to the correct Flutter SDK directory.
  3. Confirm that the Flutter SDK cache is not corrupted. You can try running flutter clean to clear the cache and then attempt pub get again.
  4. Verify that the PUB_ENVIRONMENT and PUB_CACHE environment variables are correctly set. In your case, it seems that they are already set to the appropriate values for Flutter.
  5. Check if there are any issues with the pubspec.yaml file of your project. Ensure that all dependencies and their versions are specified correctly. You can also try removing any problematic dependencies temporarily and then run pub get to see if that resolves the issue.
  6. If you are behind a proxy, make sure to configure the proxy settings for Dart and Flutter. You can set the necessary environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) or use the flutter config command to set the proxy configuration.
  7. If none of the above steps resolve the issue, try creating a new Flutter project and see if pub get works without any problems. This will help determine if the issue is specific to your project or a general problem with your Flutter installation.

@taufiq-azr taufiq-azr pinned this issue Jul 4, 2023
@taufiq-azr taufiq-azr unpinned this issue Jul 4, 2023
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

2 participants