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

Unhandled exception: Unable to Run Build runner #3539

Closed
olawills opened this issue Jun 29, 2023 · 1 comment
Closed

Unhandled exception: Unable to Run Build runner #3539

olawills opened this issue Jun 29, 2023 · 1 comment

Comments

@olawills
Copy link

Thank you for taking the time to file an issue!

In order to route, prioritize, and act on this as soon as possible please include:

  • Dart SDK version(3.0.5)
  • Build Runner version ^2.4.6
  • What builder(s) you are using (or writing yourself). Try to give a short summary of what they do.
  • I am using the flutter pub run build_runner build --delete-conflicting-outputs
  • I tried using the above version and previous version of build_runner to genrate my models and i got the error below
    Unhandled exception:
    Bad state: Unable to generate package graph, no /home/olawills/Desktop/myFlutterApps/Flutter Projects/dating_app_bloc/dating_app/.dart_tool/flutter_gen/pubspec.yaml found.
    #0 _pubspecForPath (package:build_runner_core/src/package_graph/package_graph.dart:253:5)
    Nail down the public api for builders #1 _parsePackageDependencies (package:build_runner_core/src/package_graph/package_graph.dart:227:21)
    Write a transformer wrapper to run in pub serve/build #2 PackageGraph.forPath (package:build_runner_core/src/package_graph/package_graph.dart:105:33)
#3 main (file:///home/olawills/.pub-cache/hosted/pub.dev/build_runner-2.4.6/bin/build_runner.dart:27:30)
  • My Operating System is Linux
  • I am using json serializable and json annotation to generate models for my app
    Screenshot about tghe error can be found below

Screenshot from 2023-06-29 22-23-02

@olawills
Copy link
Author

i have solved it
i solved it by deleting the .dart_tool folder and regenerating it by running dart run build_runner build

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