英文:
cant install get_cli i guess error is with posix package and pwd.dart
问题
I see you're facing an issue with building a Dart package related to get_cli
. It seems to be related to nullable types and field types in the package. Unfortunately, I can't provide a specific solution based on this error message alone, but here are some general steps you can take to troubleshoot the issue:
-
Check Dart SDK Version: Ensure that you are using a compatible version of Dart SDK with the package you are trying to build. You can check the compatibility requirements in the package's documentation.
-
Update Dependencies: Make sure that all dependencies in your
pubspec.yaml
file are up-to-date. You can rundart pub upgrade
to update your project's dependencies. -
Package Version: Check if there is a newer version of the
get_cli
package available that might have resolved these issues. You can update the package version in yourpubspec.yaml
file. -
Compiler Warnings/Errors: Look for any warnings or errors in your code that might be causing these issues. Fixing these issues might resolve the problem.
-
Package Issues: Check the GitHub repository or issue tracker for the
get_cli
package to see if others have reported similar issues. If not, consider creating a new issue with details about your problem. -
Review Code Changes: If you made any recent code changes, especially related to FFI (Foreign Function Interface), review those changes to ensure they are correct.
-
Compatibility with Dart/Flutter: Confirm that the
get_cli
package is compatible with your Dart and Flutter versions. It's possible that there may be version conflicts.
If none of these steps resolve your issue, consider providing more specific details about the problem or seeking help from the package's community or maintainers, as they may have insights into the issue you're facing.
英文:
Building package executables... (24.4s)
Failed to build get_cli:get:
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:322:35: Error: Field 'name' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? name;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:326:35: Error: Field 'password' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? password;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:330:17: Error: Field 'uid' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external int? uid;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:334:17: Error: Field 'gid' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external int? gid;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:337:35: Error: Field 'gecos' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? gecos;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:340:35: Error: Field 'dir' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? dir;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/pwd.dart:343:35: Error: Field 'shell' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? shell;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/grp.dart:369:35: Error: Field 'name' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? name;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/grp.dart:372:35: Error: Field 'passwd' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? passwd;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/grp.dart:376:17: Error: Field 'gid' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external int? gid;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/grp.dart:379:48: Error: Field 'mem' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Pointer<ffi.Int8>>? mem;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:830:38: Error: Field '_unique___locales_item_0' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_0;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:832:38: Error: Field '_unique___locales_item_1' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_1;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:834:38: Error: Field '_unique___locales_item_2' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_2;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:836:38: Error: Field '_unique___locales_item_3' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_3;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:838:38: Error: Field '_unique___locales_item_4' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_4;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:840:38: Error: Field '_unique___locales_item_5' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_5;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:842:38: Error: Field '_unique___locales_item_6' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_6;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:844:38: Error: Field '_unique___locales_item_7' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_7;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:846:38: Error: Field '_unique___locales_item_8' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_8;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:848:38: Error: Field '_unique___locales_item_9' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_9;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:850:38: Error: Field '_unique___locales_item_10' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_10;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:852:38: Error: Field '_unique___locales_item_11' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_11;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:854:38: Error: Field '_unique___locales_item_12' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<locale_data>? _unique___locales_item_12;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:861:35: Error: Field '_unique___names_item_0' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_0;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:863:35: Error: Field '_unique___names_item_1' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_1;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:865:35: Error: Field '_unique___names_item_2' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_2;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:867:35: Error: Field '_unique___names_item_3' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_3;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:869:35: Error: Field '_unique___names_item_4' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_4;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:871:35: Error: Field '_unique___names_item_5' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_5;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:873:35: Error: Field '_unique___names_item_6' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_6;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:875:35: Error: Field '_unique___names_item_7' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_7;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:877:35: Error: Field '_unique___names_item_8' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_8;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:879:35: Error: Field '_unique___names_item_9' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_9;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:881:35: Error: Field '_unique___names_item_10' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_10;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:883:35: Error: Field '_unique___names_item_11' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_11;
^
AppData/Local/Pub/Cache/hosted/pub.dev/posix-4.1.0/lib/src/string/string.dart:885:35: Error: Field '_unique___names_item_12' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external ffi.Pointer<ffi.Int8>? _unique___names_item_12;
^
PS C:\Users\Admin> dart pub cache clean
This will remove everything inside C:\Users\Admin\AppData\Local\Pub\Cache.
You will have to run `dart pub get` again in each project.
Are you sure? (y/N)?
PS C:\Users\Admin> dart pub cache clean
This will remove everything inside C:\Users\Admin\AppData\Local\Pub\Cache.
You will have to run `dart pub get` again in each project.
Are you sure? (y/N)? y
Removing pub cache directory C:\Users\Admin\AppData\Local\Pub\Cache.
PS C:\Users\Admin> dart pub global activate get_cli@1.8.0
Not a valid package name: "get_cli@1.8.0"
I am not founding any solution for this problem on internet but i tried to update dart package flutter package but nothing worked. So i need help to resolve this issue
答案1
得分: 0
flutter pub global activate get_cli 1.8.1
尝试这个版本,对我有用
英文:
flutter pub global activate get_cli 1.8.1
Try this version, solved for me
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论