[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.
4 Answers
flutter pub upgrade && flutter clean && flutter pub cache clean
this helped me
3 Comments
ymerdrengene
Adding flutter pub get, resolved it for me
Dmitrii Matunin
It is flutter pub cache clean - NOT clear
hab
this solution not working for all cases it's for specific one with specific packages
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.
2 Comments
Md Sadab Wasim
This worked for me, thanks a lot
Hoang
This also worked for me when changing environment from windows to macos
It looks like here there is a fix gql-dart/gql#308
dependency_overrides:
gql: 0.13.0
1 Comment
Oleksii Vynokur
This work only for gql package. In other cases it's useless.
pubspec.yamlandflutter -doctoroutput