Json_serializable.dart: pub finished with exit code 78

Created on 27 Feb 2019  Â·  5Comments  Â·  Source: google/json_serializable.dart

Thank you for taking the time to file an issue!

In order to route, prioritize, and act on this, please include the entire output
of either dart --version or flutter --version, depending on what
you're using.

$ dart --version
Dart VM version: 2.1.1 (Thu Feb 14 12:04:25 2019 +0100) on "macos_x64"
$ flutter --version
Flutter 1.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (3 months ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

When run build, it error

$ flutter packages pub run build_runner build
[INFO] Generating build script...
[INFO] Generating build script completed, took 309ms

[INFO] Initializing inputs
[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 817ms

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Found 10 declared outputs which already exist on disk. This is likely because the`.dart_tool/build` folder was deleted, or you are submitting generated files to your source repository.
[SEVERE] Conflicting outputs were detected and the build is unable to prompt for permission to remove them. These outputs must be removed manually or the build can be run with `--delete-conflicting-outputs`. The outputs are: lib/model/response.g.dart
lib/model/mode/bbq_mode_model.g.dart
lib/model/app_config.g.dart
lib/model/file/qiniu_file_model.g.dart
lib/model/user.g.dart
lib/model/multi_language.g.dart
lib/model/rom/rom_model.g.dart
lib/model/rom/rom_info_model.g.dart
lib/model/ecig_type_page_data.g.dart
lib/model/ecig_type.g.dart
pub finished with exit code 78

Most helpful comment

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

All 5 comments

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

That just deletes all of my outputs and hangs forever

try deleting your .dart_tool directory. Rerun pub get and then build

The only solution that worked for me was to delete manually all *.g.dart files and then run flutter pub run build_runner build.

flutter pub run build_runner clean should also work

On Sun, Aug 2, 2020 at 8:18 PM Joaquin notifications@github.com wrote:

The only solution that worked for me was to delete manually all *.g.dart
files and then run flutter pub run build_runner build.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/json_serializable.dart/issues/397#issuecomment-667781506,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEFCS5QX37RIQPRQWCGTTR6YUBLANCNFSM4G2ONYXQ
.

Was this page helpful?
0 / 5 - 0 ratings