I am having this error when trying to use moor_genarator:
`/C:/flutter/.pub-cache/hosted/pub.dartlang.org/moor_generator-4.4.1/lib/src/writer/database_writer.dart:4:8: Error: Error when reading '/C:/flutter/.pub-cache/hosted/pub.dartlang.org/moor-4.6.1+1/lib/`
`src/runtime/executor/stream_queries.dart': The system cannot find the path specified.`
- there are three moor files in my flutter .pub-cashe folder, moor-4.6.1+1, moor_flutter-4.0.0, moor_genarator-4.4.1
- there are no upgraded version after moor-4.0.0
- flutter pub get was successful
- In my pubspac.yaml - moor_generator: ^4.4.1, moor_flutter: ^4.0.0
You have to override moor:4.4.0 dependency using dependency_override section
then run following command in terminal/command prompt get packages
flutter pub get
the run following command to generate moor files.
flutter pub run build_runner build --delete-conflicting-outputs
My generation error was :
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
pub finished with exit code 78
Work for me too.