在Flutter 3.10.0上带有漂移的包中运行build_runner 2.4.2时出错

wqnecbli  于 2023-05-19  发布在  Flutter
关注(0)|答案(1)|浏览(295)

更新到Flutter 3.10.0后,在一个带有漂移的包中,我遇到了以下错误:

Failed to build build_runner:build_runner:
../../../../../.pub-cache/hosted/pub.dev/matcher-0.12.13/lib/src/error_matchers.dart:19:49: Error: 'CyclicInitializationError' isn't a type.
const isCyclicInitializationError = TypeMatcher<CyclicInitializationError>();
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dev/matcher-0.12.13/lib/src/error_matchers.dart:31:39: Error: 'NullThrownError' isn't a type.
const isNullThrownError = TypeMatcher<NullThrownError>();

我找不到任何与之相关的东西,我不知道它是否漂移,但依赖关系如下:

# dependecy injection
  get_it: ^7.6.0
  injectable: ^2.1.1

  # Storage
  drift: ^2.8.0
  encrypted_drift:
    git:
      url: https://github.com/simolus3/drift.git
      path: extras/encryption

  uuid: ^3.0.7

我运行flutter pub run build_runner build --delete-conflicting-outputs
我有以下错误:

Failed to build build_runner:build_runner:
../../../../../.pub-cache/hosted/pub.dev/matcher-0.12.13/lib/src/error_matchers.dart:19:49: Error: 'CyclicInitializationError' isn't a type.
const isCyclicInitializationError = TypeMatcher<CyclicInitializationError>();
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dev/matcher-0.12.13/lib/src/error_matchers.dart:31:39: Error: 'NullThrownError' isn't a type.
const isNullThrownError = TypeMatcher<NullThrownError>();
falq053o

falq053o1#

这个命令对我有用。

flutter pub upgrade

相关问题