当我跑到<条码>面粉末管面时,我发现这一错误:
Deprecated. Use `dart run` instead.
[INFO] Generating build script completed, took 169ms
[WARNING] ../../../.pub-cache/hosted/pub.dev/built_value_generator-8.6.1/lib/src/dart_types.dart:65:21: Error: InvalidType isn t a type.
if (dartType is InvalidType) {
^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/built_value_generator-8.6.1/lib/src/value_source_class.dart:497:20: Error: The getter name2 isn t defined for the class NamedType .
- NamedType is from package:analyzer/dart/ast/ast.dart ( ../../../.pub-cache/hosted/pub.dev/analyzer-5.7.1/lib/dart/ast/ast.dart ).
Try correcting the name to the name of an existing getter, or defining a getter or field named name2 .
if (type.name2.lexeme == Built ) {
^^^^^
[INFO] Precompiling build script... completed, took 547ms
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
因此,我操作了<条码>dart ,建造了_runner Building——delete-conflicting-outputs,我发现这一错误:
[INFO] Generating build script completed, took 172ms
[WARNING] ../../../.pub-cache/hosted/pub.dev/built_value_generator-8.6.1/lib/src/dart_types.dart:65:21: Error: InvalidType isn t a type.
if (dartType is InvalidType) {
^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/built_value_generator-8.6.1/lib/src/value_source_class.dart:497:20: Error: The getter name2 isn t defined for the class NamedType .
- NamedType is from package:analyzer/dart/ast/ast.dart ( ../../../.pub-cache/hosted/pub.dev/analyzer-5.7.1/lib/dart/ast/ast.dart ).
Try correcting the name to the name of an existing getter, or defining a getter or field named name2 .
if (type.name2.lexeme == Built ) {
^^^^^
[INFO] Precompiling build script... completed, took 570ms
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
我尝试添加<条码>gql:0.13<>/条码>,以便依赖性-over干,但我再次发现同样的错误!
I m using Flutter (Channel persistent, 3.10.5, on macOS 13.2.1 22D68 darwin-arm64, locale en-US)
and build_runner: ^2.4.5
我如何确定这一点?