运行 在 flutter 上构建 runner 时出现以下错误

When running build runner on flutter I get the following error

当我运行

flutter packages pub run build_runner build --delete-conflicting-outputs

我收到以下错误。

    Failed to precompile build_runner:build_runner:
../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.40.6/lib/error/error.dart:7:8: Error: Error when reading '../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-12.0.0/lib/src/base/errors.dart': No such file or directory
import 'package:_fe_analyzer_shared/src/base/errors.dart';

运行 以下命令:

flutter pub cache repair
flutter clean
flutter pub upgrade