Reputation: 183
[INFO] Precompiling build script......
[WARNING] ../../flutter/.pub-cache/hosted/pub.dartlang.org/gql_code_builder-0.2.0/lib/src/ast.dart:618:12: Error: A non-null value must be returned since the return type 'Expression' doesn't allow null.
- 'Expression' is from 'package:code_builder/src/specs/expression.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/code_builder-4.1.0/lib/src/specs/expression.dart').
Expression _directiveLocation(DirectiveLocation location) {
^
[INFO] Precompiling build script... completed, took 838ms
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
Upvotes: 18
Views: 13295
Reputation: 56
Deleting the pubspec.lock
file fixed it for me.
In my case, this seems to have been caused by running flutter pub get
with circular dependancies.
Upvotes: 2
Reputation: 371
flutter pub upgrade && flutter clean && flutter pub cache clean
this helped me
Upvotes: 21
Reputation: 64
It looks like here there is a fix gql-dart/gql#308
dependency_overrides:
gql: 0.13.0
Upvotes: 2