google / json_serializable.dart

Generates utilities to aid in serializing to/from JSON.
https://pub.dev/packages/json_serializable
BSD 3-Clause "New" or "Revised" License
1.54k stars 393 forks source link

Error: The method 'elementAtOrNull' isn't defined for the class 'NodeListImpl<TypeAnnotationImpl>'. #1336

Closed moyinqingshang closed 1 year ago

moyinqingshang commented 1 year ago

Failed to build build_runner:build_runner: /Applications/flutter/flutter3.3.2/.pub-cache/hosted/pub.flutter-io.cn/analyzer-5.3.0/lib/src/dart/ast/ast.dart:8153:48: Error: The method 'elementAtOrNull' isn't defined for the class 'NodeListImpl'.

每次运行flutter packages pub run build_runner build就会报错 json_serializable: 6.6.1 json_annotation: 4.8.0 flutter:3.3.2

kevmoo commented 1 year ago

Have you tried running pub upgrade? When you run pub upgrade are there any dependencies that are NOT updated?

github-actions[bot] commented 1 year ago

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!