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

Cannot run build runner #86

Open
clotodex opened this issue Mar 30, 2023 · 0 comments
Open

Cannot run build runner #86

clotodex opened this issue Mar 30, 2023 · 0 comments

Comments

@clotodex
Copy link


[INFO] Generating build script...
[INFO] Generating build script completed, took 319ms

[INFO] Precompiling build script......
[WARNING] ../../../../../../.pub-cache/hosted/pub.dev/go_router_builder-1.1.7/lib/src/route_config.dart:94:57: Error: The getter 'element' isn't defined for the class 'InterfaceType'.
 - 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../../../../.pub-cache/hosted/pub.dev/analyzer-5.0.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'element'.
    final InterfaceElement classElement = typeParamType.element;
                                                        ^^^^^^^
../../../../../../.pub-cache/hosted/pub.dev/go_router_builder-1.1.7/lib/src/route_config.dart:403:32: Error: The getter 'element' isn't defined for the class 'InterfaceType'.
 - 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../../../../.pub-cache/hosted/pub.dev/analyzer-5.0.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'element'.
  final String enumName = type.element.name;
                               ^^^^^^^
../../../../../../.pub-cache/hosted/pub.dev/go_router_builder-1.1.7/lib/src/route_config.dart:410:45: Error: The getter 'element' isn't defined for the class 'InterfaceType'.
 - 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../../../../.pub-cache/hosted/pub.dev/analyzer-5.0.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'element'.
  for (final FieldElement enumField in type.element.fields
                                            ^^^^^^^
../../../../../../.pub-cache/hosted/pub.dev/go_router_builder-1.1.7/lib/src/type_helpers.dart:93:54: Error: The getter 'element' isn't defined for the class 'InterfaceType'.
 - 'InterfaceType' is from 'package:analyzer/dart/element/type.dart' ('../../../../../../.pub-cache/hosted/pub.dev/analyzer-5.0.0/lib/dart/element/type.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'element'.
String enumMapName(InterfaceType type) => '_\$${type.element.name}EnumMap';
                                                     ^^^^^^^
[INFO] Precompiling build script... completed, took 5.4s

[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

Adding the analyzer 1.0.0 just breaks the build runner completely.

Running flutter version:

Flutter 3.7.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 90c64ed42b (9 days ago) • 2023-03-21 11:27:08 -0500
Engine • revision 9aa7816315
Tools • Dart 2.19.5 • DevTools 2.20.1
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

1 participant