dart-lang / build

A build system for Dart written in Dart
https://pub.dev/packages/build
BSD 3-Clause "New" or "Revised" License
791 stars 211 forks source link

Cannot open file, path = '.dart_tool/build/entrypoint/build.dart.dill.cached' #3664

Closed urmatt closed 8 months ago

urmatt commented 8 months ago

I'm getting error when I running dart run build_runner build command also with --delete-conflicting-outputs.

I can't remember which actions I doing before that error. But I don't added new packages and before it works fine.

The error if following:

PathNotFoundException: Cannot open file, path = 
'.dart_tool/build/entrypoint/build.dart.dill.cached' (OS Error: No such file or directory, errno = 2)
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381)
<asynchronous suspension>
#2      _FileStreamConsumer.addStream.<anonymous closure> (dart:io/file_impl.dart:205)
<asynchronous suspension>

Flutter version 3.19.5

No issues found! by flutter doctor

jakemac53 commented 8 months ago

Interesting, do you see any other error prior to this? You should see a log about compiling your build script, did that say it completed successfully, or did it have an error?

urmatt commented 8 months ago

With this error message it brokens. I cleaned pub cache, flutter clean, removed all generated folders and files nothing helped. At the end I copied project from git again in new folder and then error disappeared.

jakemac53 commented 8 months ago

Ok, I am going to close this because I can't reproduce it, and you seem unblocked. If we get further reports with a reproduction case we can look into it.