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

pub is deprecated error message #3802

Closed
pryme-empire10 opened this issue Feb 24, 2023 · 26 comments
Closed

pub is deprecated error message #3802

pryme-empire10 opened this issue Feb 24, 2023 · 26 comments
Labels
needs-info Additional information needed from the issue author type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@pryme-empire10
Copy link

pub get failed
command: "C:\src\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub --directory . get --example"
pub env: {
"FLUTTER_ROOT": "C:\src\flutter",
"PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",
"PUB_CACHE": "C:\Users\BOSS-PRYME\AppData\Local\Pub\Cache",
}

@AdrielCosta420
Copy link

AdrielCosta420 commented Feb 26, 2023

bro, here's response https://stackoverflow.com/questions/55898181/update-dart-sdk-for-flutter

@sigurdm
Copy link
Contributor

sigurdm commented Feb 27, 2023

Not sure I understand the problem.

flutter is using the dart __deprecated_pub because it exposes an interface compatible with the old pub command. At some point we want to migrate flutter to use dart pub.

That is why it is deprecated. We don't want new users of this interface.

@sigurdm sigurdm added the needs-info Additional information needed from the issue author label Feb 27, 2023
@alemontesdeoca
Copy link

I'm facing the same error

@sigurdm
Copy link
Contributor

sigurdm commented Mar 13, 2023

@alemontesdeoca

Can you give more details? What are you trying to do, what is the command you are running, and what is the error message you are seeing.

@alemontesdeoca
Copy link

alemontesdeoca commented Mar 13, 2023

@alemontesdeoca

Can you give more details? What are you trying to do, what is the command you are running, and what is the error message you are seeing.

I'm trying to run 'pug get' and I'm getting:

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

@sigurdm
Copy link
Contributor

sigurdm commented Mar 13, 2023

What version of flutter are you using?

@sigurdm
Copy link
Contributor

sigurdm commented Mar 13, 2023

What is the pubspec.yaml?

Did this use to work or is this first time you run pub get? Did you just upgrade?

@alemontesdeoca
Copy link

alemontesdeoca commented Mar 13, 2023

What is the pubspec.yaml?

Did this use to work or is this first time you run pub get? Did you just upgrade?
Before it worked ok. It started to happen last Friday when I ran "pub get"

name: public
description: description
publish_to: none

version: 20.1.1

environment:
  sdk: ">=2.17.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  http: ^0.13.5
  firebase_app_installations: ^0.2.1+5  shared_preferences_ios: ^2.1.1
  logger: ^1.1.0
  http: ^0.13.3
  url_launcher: ^6.0.12
  intl: 0.17.0
  intl_utils: ^2.4.0
  camera: ^0.10.0+4
  shared_preferences: ^2.0.15
  path_provider: ^2.0.7
  google_maps_flutter: ^2.1.8
  package_info: ^2.0.2
  flutter_svg: ^2.0.2 
  flutter_image_compress: ^1.1.0
  stack_trace: ^1.10.0
  collection: ^1.15.0
  firebase_core: ^2.1.1
  firebase_crashlytics: ^3.0.4
  firebase_messaging: ^14.0.4
  firebase_remote_config: ^3.0.4
  cloud_firestore: ^4.0.4
  firebase_analytics: ^10.0.4
  firebase_auth: ^4.1.1
  dotted_border: ^2.0.0+1
  path_drawing: ^1.0.1
  flutter_bloc: ^8.1.1
  bloc_concurrency: ^0.2.0
  cached_network_image: ^3.1.0
  flutter_cache_manager: ^3.1.2
  equatable: ^2.0.3
  qr_flutter: ^4.0.0
  image_picker: ^0.8.4+4
  signature: ^5.1.0
  email_validator: ^2.0.1
  flutter_polyline_points: ^1.0.0
  geolocator: ^8.0.3
  device_info: ^2.0.2
  dio: ^4.0.0
  dio_http2_adapter: ^2.0.0
  json_annotation: ^4.1.0
  weather: ^2.0.1
  percent_indicator: ^4.2.2
  shimmer: ^2.0.0
  flutter_modular: ^5.0.3
  modular_bloc_bind: ^1.0.1
  flutter_animarker: ^3.2.0
  crypto: ^3.0.1
  multiple_localization: ^0.3.0
  sentry_flutter: ^6.18.2
  dart_ipify: ^1.1.1
  internet_connection_checker: ^1.0.0+1
  cupertino_icons: ^1.0.2
  sign_in_with_apple: ^4.1.0
  store_redirect: ^2.0.0
  permission_handler: ^10.2.0
  mobile_scanner: ^3.0.0
  package_info_plus: ^3.0.1
  google_sign_in: ^5.4.4
  lottie: ^2.2.0
  restart_app: ^1.1.2
  flutter_html: ^3.0.0-alpha.6
  firebase_app_installations: ^0.2.1+5
  geocoding: ^2.0.5
 
dev_dependencies:
  bloc_test: ^9.1.0
  build_runner: ^2.3.0
  flutter_launcher_icons: ^0.11.0
  flutter_lints: ^2.0.1
  flutter_test:
    sdk: flutter
  integration_test:
    sdk: flutter
  json_serializable: ^6.5.4 
  mocktail: ^0.3.0
  modular_test: ^2.0.0
  patrol: ^1.0.0

patrol:    

flutter:
  uses-material-design: true
  assets:

@alemontesdeoca
Copy link

What version of flutter are you using?

I'm using version 3.7.5 stable

@sigurdm
Copy link
Contributor

sigurdm commented Mar 13, 2023

Could you try running

dart pub get

and paste the output?

Please use code fences.

@alemontesdeoca
Copy link

dart pub get

$ dart pub get
Resolving dependencies... (1:36.0s)
+ _fe_analyzer_shared 55.0.0
+ _flutterfire_internals 1.0.17
+ analyzer 5.7.1
+ archive 3.3.2 (3.3.6 available)
+ args 2.4.0
+ async 2.10.0 (2.11.0 available)
+ background_locator_2 2.0.6
+ bloc 8.1.1
+ bloc_concurrency 0.2.1
+ bloc_test 9.1.1
+ boolean_selector 2.1.1
+ build 2.3.1
+ build_config 1.1.1
+ build_daemon 3.1.1
+ build_resolvers 2.2.0
+ build_runner 2.3.3 (2.4.0 available)
+ build_runner_core 7.2.7
+ built_collection 5.1.1
+ built_value 8.4.4
+ cached_network_image 3.2.3
+ cached_network_image_platform_interface 2.0.0
+ cached_network_image_web 1.0.2
+ camera 0.10.3+2
+ camera_avfoundation 0.9.13+1
+ camera_platform_interface 2.4.1
+ camera_web 0.3.1+3
+ characters 1.2.1 (1.3.0 available)
+ checked_yaml 2.0.2
+ cli_util 0.3.5 (0.4.0 available)
+ clock 1.1.1
+ cloud_firestore 4.4.4
+ cloud_firestore_platform_interface 5.11.4
+ cloud_firestore_web 3.3.4
+ code_builder 4.4.0
+ collection 1.17.0 (1.17.1 available)
+ convert 3.1.1
+ coverage 1.6.3
+ cross_file 0.3.3+4
+ crypto 3.0.2
+ csslib 0.17.2
+ cupertino_icons 1.0.5
+ dart_ipify 1.1.1
+ dart_style 2.2.5
+ dartz 0.10.1
+ dbus 0.7.8
+ device_info 2.0.3
+ device_info_platform_interface 2.0.1
+ diff_match_patch 0.4.1
+ dio 4.0.6 (5.0.2 available)
+ dio_http2_adapter 2.0.0 (2.1.0 available)
+ dotted_border 2.0.0+3
+ email_validator 2.1.17
+ equatable 2.0.5
+ fake_async 1.3.1
+ ffi 2.0.1
+ file 6.1.4
+ firebase_analytics 10.1.5
+ firebase_analytics_platform_interface 3.3.22
+ firebase_analytics_web 0.5.1+13
+ firebase_app_installations 0.2.1+13
+ firebase_app_installations_platform_interface 0.1.1+34
+ firebase_app_installations_web 0.1.1+23
+ firebase_auth 4.2.10
+ firebase_auth_platform_interface 6.11.12
+ firebase_auth_web 5.2.9
+ firebase_core 2.7.1
+ firebase_core_platform_interface 4.5.3
+ firebase_core_web 2.2.2
+ firebase_crashlytics 3.0.16
+ firebase_crashlytics_platform_interface 3.3.16
+ firebase_messaging 14.2.6
+ firebase_messaging_platform_interface 4.2.15
+ firebase_messaging_web 3.2.16
+ firebase_remote_config 3.0.14
+ firebase_remote_config_platform_interface 1.1.34
+ firebase_remote_config_web 1.1.23
+ fixnum 1.1.0
+ flutter 0.0.0 from sdk flutter
+ flutter_animarker 3.2.0
+ flutter_bloc 8.1.2
+ flutter_blurhash 0.7.0
+ flutter_cache_manager 3.3.0
+ flutter_driver 0.0.0 from sdk flutter
+ flutter_html 3.0.0-alpha.6
+ flutter_image_compress 1.1.3
+ flutter_launcher_icons 0.11.0 (0.12.0 available)
+ flutter_lints 2.0.1
+ flutter_local_notifications 12.0.4 (13.0.0 available)
+ flutter_local_notifications_linux 2.0.0 (3.0.0+1 available)
+ flutter_local_notifications_platform_interface 6.0.0
+ flutter_localizations 0.0.0 from sdk flutter
+ flutter_modular 5.0.3
+ flutter_modular_annotations 0.0.2
+ flutter_plugin_android_lifecycle 2.0.9
+ flutter_polyline_points 1.0.0
+ flutter_segment 3.11.0 (3.12.1 available)
+ flutter_svg 2.0.3
+ flutter_test 0.0.0 from sdk flutter
+ flutter_web_plugins 0.0.0 from sdk flutter
+ flutter_windowmanager 0.2.0
+ fluttertoast 8.2.1
+ frontend_server_client 3.2.0
+ fuchsia_remote_debug_protocol 0.0.0 from sdk flutter
+ geocoding 2.1.0
+ geocoding_android 2.1.0
+ geocoding_ios 2.1.0
+ geocoding_platform_interface 2.0.1
+ geolocator 8.2.1 (9.0.2 available)
+ geolocator_android 3.2.1 (4.1.7 available)
+ geolocator_apple 2.2.5
+ geolocator_platform_interface 4.0.7
+ geolocator_web 2.1.6
+ geolocator_windows 0.1.1
+ glob 2.1.1
+ google_maps_flutter 2.2.5
+ google_maps_flutter_android 2.4.9
+ google_maps_flutter_ios 2.2.1
+ google_maps_flutter_platform_interface 2.2.6
+ google_mlkit_barcode_scanning 0.5.0
+ google_mlkit_commons 0.2.0
+ google_sign_in 5.4.4 (6.0.2 available)
+ google_sign_in_android 6.1.8
+ google_sign_in_ios 5.6.1
+ google_sign_in_platform_interface 2.3.1
+ google_sign_in_web 0.10.2+1 (0.11.0+2 available)
+ googleapis_auth 1.3.1
+ graphs 2.2.0
+ grpc 3.1.0
+ hive 2.2.3
+ html 0.15.2
+ http 0.13.5
+ http2 2.0.1
+ http_multi_server 3.2.1
+ http_parser 4.0.2
+ image 3.3.0 (4.0.15 available)
+ image_picker 0.8.7
+ image_picker_android 0.8.6+1
+ image_picker_for_web 2.1.12
+ image_picker_ios 0.8.7+1
+ image_picker_platform_interface 2.6.3
+ in_app_update 3.0.0 (4.0.1 available)
+ integration_test 0.0.0 from sdk flutter
+ internet_connection_checker 1.0.0+1
+ intl 0.17.0 (0.18.0 available)
+ intl_utils 2.8.2
+ io 1.0.4
+ js 0.6.5 (0.6.7 available)
+ json_annotation 4.8.0
+ json_serializable 6.6.1
+ lints 2.0.1
+ logger 1.3.0
+ logging 1.1.1
+ matcher 0.12.13 (0.12.14 available)
+ material_color_utilities 0.2.0
+ meta 1.8.0 (1.9.0 available)
+ mime 1.0.4
+ mobile_scanner 3.0.0
+ mocktail 0.3.0
+ modular_bloc_bind 1.0.1
+ modular_core 2.0.3+1
+ modular_interfaces 2.0.2 (3.0.0 available)
+ modular_test 2.0.0
+ multiple_localization 0.3.0
+ nested 1.0.0
+ node_preamble 2.0.2
+ numerus 2.0.0
+ octo_image 1.0.2
+ package_config 2.1.0
+ package_info 2.0.2
+ package_info_plus 3.0.3
+ package_info_plus_platform_interface 2.0.1
+ path 1.8.2 (1.8.3 available)
+ path_drawing 1.0.1
+ path_parsing 1.0.1
+ path_provider 2.0.13
+ path_provider_android 2.0.24
+ path_provider_foundation 2.1.3
+ path_provider_linux 2.1.10
+ path_provider_platform_interface 2.0.6
+ path_provider_windows 2.1.5
+ patrol 1.0.7
+ pedantic 1.11.1
+ percent_indicator 4.2.3
+ permission_handler 10.2.0
+ permission_handler_android 10.2.0
+ permission_handler_apple 9.0.7
+ permission_handler_platform_interface 3.9.0
+ permission_handler_windows 0.1.2
+ petitparser 5.1.0 (5.3.0 available)
+ platform 3.1.0
+ plugin_platform_interface 2.1.4
+ pool 1.5.1
+ process 4.2.4
+ protobuf 2.1.0
+ provider 6.0.5
+ pub_semver 2.1.3
+ pubspec_parse 1.2.2
+ qr 2.1.0 (3.0.1 available)
+ qr_flutter 4.0.0
+ quiver 3.2.1
+ restart_app 1.1.2
+ rxdart 0.27.7
+ screen_brightness 0.2.2
+ screen_brightness_android 0.1.0
+ screen_brightness_ios 0.1.0
+ screen_brightness_macos 0.1.0+1
+ screen_brightness_platform_interface 0.1.0
+ screen_brightness_windows 0.1.1
+ sentry 6.22.0
+ sentry_dio 6.22.0
+ sentry_flutter 6.22.0
+ shared_preferences 2.0.18
+ shared_preferences_android 2.0.17
+ shared_preferences_foundation 2.1.5
+ shared_preferences_ios 2.1.1 (discontinued replaced by shared_preferences_foundation)
+ shared_preferences_linux 2.1.5
+ shared_preferences_platform_interface 2.1.1
+ shared_preferences_web 2.0.6
+ shared_preferences_windows 2.1.5
+ shelf 1.4.0
+ shelf_packages_handler 3.0.1
+ shelf_static 1.1.1
+ shelf_web_socket 1.0.3
+ shimmer 2.0.0
+ sign_in_with_apple 4.3.0
+ sign_in_with_apple_platform_interface 1.0.0
+ sign_in_with_apple_web 1.0.1
+ signature 5.1.0 (5.3.2 available)
+ sky_engine 0.0.99 from sdk flutter
+ source_gen 1.2.7
+ source_helper 1.3.3
+ source_map_stack_trace 2.1.1
+ source_maps 0.10.12
+ source_span 1.9.1
+ sqflite 2.2.5
+ sqflite_common 2.4.2+2
+ stack_trace 1.11.0
+ store_redirect 2.0.1
+ stream_channel 2.1.1
+ stream_transform 2.1.0
+ string_scanner 1.2.0
+ styled_text 7.0.0
+ sync_http 0.3.1
+ synchronized 3.0.1
+ term_glyph 1.2.1
+ test 1.22.0 (1.23.1 available)
+ test_api 0.4.16 (0.4.18 available)
+ test_core 0.4.20 (0.4.24 available)
+ timezone 0.9.1
+ timing 1.0.1
+ typed_data 1.3.1
+ url_launcher 6.1.10
+ url_launcher_android 6.0.25
+ url_launcher_ios 6.1.2
+ url_launcher_linux 3.0.4
+ url_launcher_macos 3.0.4
+ url_launcher_platform_interface 2.1.2
+ url_launcher_web 2.0.16
+ url_launcher_windows 3.0.5
+ uuid 3.0.7
+ vector_graphics 1.1.3
+ vector_graphics_codec 1.1.3
+ vector_graphics_compiler 1.1.3
+ vector_math 2.1.4
+ vm_service 9.4.0 (11.2.0 available)
+ watcher 1.0.2
+ weather 2.0.1
+ web_socket_channel 2.3.0
+ webdriver 3.0.1 (3.0.2 available)
+ webkit_inspection_protocol 1.2.0
+ webview_flutter 2.8.0 (4.0.6 available)
+ webview_flutter_android 2.10.4 (3.4.2 available)
+ webview_flutter_platform_interface 1.9.5 (2.1.0 available)
+ webview_flutter_wkwebview 2.9.5 (3.2.1 available)
+ win32 3.1.3 (4.1.1 available)
+ xdg_directories 0.2.0+3 (1.0.0 available)
+ xml 6.2.2
+ xmlstream 1.0.0
+ yaml 3.1.1

@sigurdm
Copy link
Contributor

sigurdm commented Mar 13, 2023

Hmm, that seemed to work - weird.

Could you paste the output of

flutter pub get --verbose

?

@sigurdm sigurdm added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Mar 14, 2023
@sigurdm
Copy link
Contributor

sigurdm commented Mar 14, 2023

It seems we have broken the output of a flutter pub failure.

@sigurdm
Copy link
Contributor

sigurdm commented Mar 14, 2023

@individual-777 could you try running

flutter --verbose pub get

And pasting the full output?

Please use code fences.

@sigurdm
Copy link
Contributor

sigurdm commented Mar 14, 2023

Realizing this looks like flutter/flutter#118314 that has already been fixed.

Try using the beta-channel.

@khaldoonAlmashwli
Copy link

Hmm, that seemed to work - weird.

Could you paste the output of

flutter pub get --verbose

?

I have the same error i need help

@khaldoonAlmashwli
Copy link

flutter pub get
Running "flutter pub get" in untitled3...
Resolving dependencies... (10.0s)

@MoElkilany
Copy link

pub get failed command: "/Users/mohamedkilany/Developer/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --color --directory . get --example" pub env: { "FLUTTER_ROOT": "/Users/mohamedkilany/Developer/flutter", "PUB_ENVIRONMENT": "flutter_cli:get", "PUB_CACHE": "/Users/mohamedkilany/.pub-cache", } exit code: 69

what is the problem here!?

@Khiemvx23
Copy link

[ +4 ms] pub get failed
command: "/Users/khiemvx/development/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --color --verbose --directory . get --example"
pub env: {
"FLUTTER_ROOT": "/Users/khiemvx/development/flutter",
"PUB_ENVIRONMENT": "flutter_cli:get",
"PUB_CACHE": "/Users/khiemvx/.pub-cache",
}
exit code: 69

[ +3 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _DefaultPub._runWithStdioInherited (package:flutter_tools/src/dart/pub.dart:468:7)

#2 _DefaultPub.get (package:flutter_tools/src/dart/pub.dart:346:5)

#3 PackagesGetCommand._runPubGet (package:flutter_tools/src/commands/packages.dart:140:7)

#4 PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:175:5)

#5 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1257:27)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#8 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)

#11 run.. (package:flutter_tools/runner.dart:64:9)

#12 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#13 main (package:flutter_tools/executable.dart:91:3)

I'm facing with the same issue, can't create new flutter project also run a project existed

@bakboem
Copy link

bakboem commented Mar 25, 2023

It appeared after I removed /Users/bakbeom/.pub-cache
+++++++++++++++++++
When I remove all direct references to git repository in pubspec.yaml it wokrs!
+++++++++++++++++++
pub get failed
command: "/Users/bakbeom/install/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --color --directory . get --example"
pub env: {
"FLUTTER_ROOT": "/Users/bakbeom/install/flutter",
"PUB_ENVIRONMENT": "flutter_cli:verify:run",
"PUB_CACHE": "/Users/bakbeom/.pub-cache",
}
exit code: 1

@fehmidevoteam
Copy link

fehmidevoteam commented Apr 6, 2023

you should give permission and change the owner of your project build folder and your entire project folder
command:
sudo chown -R your_mac_username: path_to_your_project/build
sudo chown -R your_mac_username: path_to_your_project

@pryme-empire10 your_mac_username= BOSS-PRYME in your case

you can check this link for more details:
https://macpaw.com/fr/how-to/permission-denied-terminal

@rxvivek
Copy link

rxvivek commented Apr 10, 2023

I am facing same issue,
i am working on flutter migration, i am using flutter 3.7.10 v, when i moved one branch to other i need to use updated version of the flutter. it's working fine when i used low version of my project, but i want to upgrade my project in different branch, I am facing issue.

400 Bad Request trying to find package numerus at https://pub.dev.
pub get failed
command: "/Users/vivek.mavani/fvm/versions/3.7.10/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"
pub env: {
"FLUTTER_ROOT": "/Users/vivek.mavani/fvm/versions/3.7.10",
"PUB_ENVIRONMENT": "flutter_cli:get",
"PUB_CACHE": "/Users/vivek.mavani/.pub-cache",
}
exit code: 69

@MaundoMoru
Copy link

MaundoMoru commented Apr 14, 2023

I think this error occurs if you try to use deprecated version of dependencies on you flutter app. Because I'm facing this issue when trying to update the dependencies which dont match the current flutter version that I'm using.

@tntkhang
Copy link

tntkhang commented Apr 16, 2023

Finally, I can solve this problem by running: flutter channel beta
After that all flutter cmd work without "_deprecated_pub --directory...."error anymore.
More info about that you can read on this: https://stackoverflow.com/a/55909127

@wenjunh111
Copy link

file_picker: ^5.2.11 remove this

@github-actions
Copy link

Without additional information we're not able to resolve this issue. Feel free to add more info or respond to any questions above and we can reopen the case. Thanks for your contribution!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Additional information needed from the issue author type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests