I kept getting this answer when trying to install dependencies using flutter pub get
.
No matter what I did (on Ubuntu) it persisted. Even though I uninstalled flutter, tried fvm and then asdf.
[INFO] Precompiling build script......
ERROR: ERROR: ERROR: Could not find a command named "/home/username/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot".
I tried cache clear, cache repair, clean, ...
I was able to finally fix it by just deleting all pubspec.lock
files in my project and then running flutter pub get
again.
There seems to have been an issue with one flutter beta version, that put the dependency there and I could not get rid of it without cleaning up the pubspec files.