Can't Install Get CLI

130 Views Asked by At

I tried to install get CLI by CMD in Windows 10, and I can create project smoothly, my Flutter and Dart version are latest about Flutter version 3.16.7 and Dart version 3.2.4, what the problem after is when it flutter pub get, I get error like this:

Running `flutter pub get` …

$ flutter pub get
Resolving dependencies...
  flutter_lints 2.0.3 (3.0.1 available)
  lints 2.1.1 (3.0.0 available)
  matcher 0.12.16 (0.12.16+1 available)
  material_color_utilities 0.5.0 (0.8.0 available)
  meta 1.10.0 (1.11.0 available)
  path 1.8.3 (1.9.0 available)
  test_api 0.6.1 (0.7.0 available)
  web 0.3.0 (0.4.2 available)
Got dependencies!
8 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
$ dart migrate --apply-changes --skip-import-check
Could not find a command named "migrate".

Usage: dart <command|dart-file> [arguments]

Global options:
-v, --verbose               Show additional command output.
    --version               Print the Dart SDK version.
    --enable-analytics      Enable analytics.
    --disable-analytics     Disable analytics.
    --suppress-analytics    Disallow analytics for this `dart *` run without changing the analytics configuration.
-h, --help                  Print this usage information.

Available commands:
  analyze    Analyze Dart code in a directory.
  compile    Compile Dart to various formats.
  create     Create a new Dart project.
  devtools   Open DevTools (optionally connecting to an existing application).
  doc        Generate API documentation for Dart projects.
  fix        Apply automated fixes to Dart source code.
  format     Idiomatically format Dart source code.
  info       Show diagnostic information about the installed tooling.
  pub        Work with packages.
  run        Run a Dart program.
  test       Run tests for a project.

Run "dart help <command>" for more information about a command.
See https://dart.dev/tools/dart-tool for detailed documentation.
✖  + error_unexpected ShellException(dart migrate --apply-changes --skip-import-check, exitCode 64, workingDirectory: C:\Users\USER\train_gunawan)


Time: 12049 Milliseconds

C:\Users\USER>

Full CMD command:

C:\Users\USER>get create project train_gunawan

  1) Flutter Project
  2) Get Server
Select which type of project you want to create ? [1]
What is your company's domain?  Example: com.yourcompany  com.traingunawan

  1) Swift
  2) Objective-C
what language do you want to use on ios? [1]

  1) Kotlin
  2) Java
what language do you want to use on android? [1]

  1) Yes!
  2) No
Do you want to use null safe? [1]

  1) yes
  2) no
do you want to use some linter? [1]

Running `flutter create C:\Users\USER\train_gunawan` …

$ flutter create --no-pub -i swift -a kotlin --org com.traingunawan C:\Users\USER\train_gunawan
Recreating project ....
Wrote 3 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev

In order to run your application, type:

  $ cd .
  $ flutter run

Your application code is in .\lib\main.dart.


Running `flutter pub get` …

$ flutter pub get
Resolving dependencies...
  flutter_lints 2.0.3 (3.0.1 available)
  lints 2.1.1 (3.0.0 available)
  matcher 0.12.16 (0.12.16+1 available)
  material_color_utilities 0.5.0 (0.8.0 available)
  meta 1.10.0 (1.11.0 available)
  path 1.8.3 (1.9.0 available)
  test_api 0.6.1 (0.7.0 available)
  web 0.3.0 (0.4.2 available)
Got dependencies!
8 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
$ dart migrate --apply-changes --skip-import-check
Could not find a command named "migrate".

Usage: dart <command|dart-file> [arguments]

Global options:
-v, --verbose               Show additional command output.
    --version               Print the Dart SDK version.
    --enable-analytics      Enable analytics.
    --disable-analytics     Disable analytics.
    --suppress-analytics    Disallow analytics for this `dart *` run without changing the analytics configuration.
-h, --help                  Print this usage information.

Available commands:
  analyze    Analyze Dart code in a directory.
  compile    Compile Dart to various formats.
  create     Create a new Dart project.
  devtools   Open DevTools (optionally connecting to an existing application).
  doc        Generate API documentation for Dart projects.
  fix        Apply automated fixes to Dart source code.
  format     Idiomatically format Dart source code.
  info       Show diagnostic information about the installed tooling.
  pub        Work with packages.
  run        Run a Dart program.
  test       Run tests for a project.

Run "dart help <command>" for more information about a command.
See https://dart.dev/tools/dart-tool for detailed documentation.
✖  + error_unexpected ShellException(dart migrate --apply-changes --skip-import-check, exitCode 64, workingDirectory: C:\Users\USER\train_gunawan)


Time: 12049 Milliseconds


C:\Users\USER>

What can I try next?

0

There are 0 best solutions below