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

return result.unitWithPath(element.source.fullName)?.unit; #5

Open
988494 opened this issue Mar 19, 2023 · 1 comment
Open

return result.unitWithPath(element.source.fullName)?.unit; #5

988494 opened this issue Mar 19, 2023 · 1 comment

Comments

@988494
Copy link

988494 commented Mar 19, 2023

PS C:\Users\yzx\Downloads\telegram-flutter-master\telegram-flutter-master\tools> .\gen.bat
run gen
start: app
start: app_controller
start: chat_actions_panel
start: chat_kit
1/39: chat_actions_panel
start: core_presentation
2/39: app_controller
start: core_ui_jugger
3/39: chat_kit
start: coreui
Waiting for another flutter command to release the startup lock...

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!

Failed to build build_runner:build_runner:
../../../../AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/build_resolvers-2.2.0/lib/src/resolver.dart:195:25: Error: The method 'unitWithPath' isn't defined for the class 'ResolvedL
ibraryResult'.

  • 'ResolvedLibraryResult' is from 'package:analyzer/dart/analysis/results.dart' ('../../../../AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/analyzer-5.2.0/lib/dart/analysis/results
    .dart').
    Try correcting the name to the name of an existing method, or defining a method named 'unitWithPath'.
    return result.unitWithPath(element.source.fullName)?.unit;
    ^^^^^^^^^^^^

pub finished with exit code 1
Unhandled exception:
command finished with exit code 1

flutter 3.7.7
dart 2.19.4

@baldarama
Copy link

i had a similar issue, i solved it by updating analyzer to the latest version
on this files:
dependencies_module_generator/generator/pubspec.yaml
factory_widget_generator/generator/pubspec.yaml
scope_generator/generator/pubspec.yaml

i replaced
analyzer: 5.2.0
with
analyzer: 5.11.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

2 participants