flutter 未能预编译生成脚本,dart_tool/build/入口点/build.dart

ttcibm8c  于 2023-01-06  发布在  Flutter
关注(0)|答案(1)|浏览(296)

我在将ferry包从0.10.4更新到0.13.0时遇到了一个问题。当执行dart run build_runner build --delete-conflicting-outputs时,它总是抛出下一个错误:
'[警告]由于核心包更新,预编译生成脚本无效[警告]错误:无法以可靠的null安全运行,因为以下依赖项不支持null安全:

  • Package :箭筒

有关解决方案,请参阅https://dart.dev/go/unsound-null-safety [INFO]预编译生成脚本...已完成,耗时3.3秒[严重]未能预编译生成脚本。dart_tool/build/entrypoint/build. dart。这可能是由于生成器定义配置错误所致。“
这些是我的渡轮包裹:

#ferry configurations:
  ferry: ^0.13.0
  gql_http_link: ^0.4.5

dev_dependencies:
   flutter_test:
    sdk: flutter
  ferry_generator: ^0.7.0
  flutter_lints: ^2.0.1
  build_runner: ^2.3.3

我也尝试过将gql 0.14.0添加到dependency_overrides中,但是它抛出了同样的错误。有什么可能的解决方案吗?

u1ehiz5o

u1ehiz5o1#

试试这个组合,用你需要的,

dependencies:
  ferry: ^0.10.4
  ferry_hive_store: ^0.4.4
  ferry_cache: ^0.5.5
  ferry_exec: ^0.1.4
  normalize: ^0.5.5
  gql: 0.13.1-alpha+1645425888336
  gql_link: ^0.4.2-alpha+1635885531659
  gql_error_link: ^0.2.0
  gql_exec: ^0.3.2-alpha+1635885531651
  gql_code_builder: ^0.2.0
  gql_dio_link: ^0.2.2-alpha+1635885531750
  gql_dedupe_link: ^2.0.1

dev_dependencies:

  ferry_generator: ^0.4.4
  freezed: 2.0.3 # can't update to 2.0.5 until we can use analyzer 4.0

dependency_overrides:
  analyzer: ^3.4.1

Source - https://github.com/gql-dart/gql/issues/308#issuecomment-1192756840

相关问题