Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter build runner - pub finished with exit code 65

EDIT 3 This must be a font_awesome_flutter issue. When I leave dependency_overrides in pubspec.yaml but remove the font_awesome_flutter argument, so just do this:

dependency_overrides:

It works.

I upgraded to flutter 2.0 and now I get this error when I try to run flutter pub run build_runner watch --delete-conflicting-outputs:

The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
pub finished with exit code 65

Any idea how to fix? I have run flutter pub get and pub get many times.

pubspec.yaml:

    name: vepo
description: The Vepo mobile app.
publish_to: "none"
version: 1.0.0+1

environment:
  sdk: '>=2.12.0 <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  animate_do: ^2.0.0
  cloud_firestore: ^1.0.1
  dio: ^4.0.0
  enum_to_string: ^2.0.1
  firebase_analytics: ^7.1.1
  firebase_auth: ^1.0.1
  firebase_core: ^1.0.1
  flash: ^1.5.1
  flutter_hooks: ^0.16.0
  flutter_icons: ^1.1.0
  flutter_launcher_icons: ^0.9.0
  flutter_native_splash: ^1.1.7+1
  flutter_riverpod: ^0.13.1+1
  flutter_typeahead: ^3.1.1
  font_awesome_flutter: ^9.0.0
  freezed: ^0.14.1+2
  freezed_annotation: ^0.14.1
  google_fonts: ^2.0.0
  google_maps_webservice: ^0.0.20-nullsafety.2
  hive: ^2.0.2
  hive_flutter: ^1.0.0
  hive_generator: ^1.0.1
  hooks_riverpod: ^0.13.1+1
  http: ^0.13.1
  image_cropper: ^1.4.0
  image_picker: ^0.7.4
  json_annotation: ^4.0.1
  json_serializable: ^4.1.0
  keyboard_avoider: ^0.1.2
  logger: ^1.0.0
  reactive_forms: ^10.0.3
  rxdart: ^0.26.0
  smooth_page_indicator: ^0.2.3
  uuid: ^3.0.3

dependency_overrides:
  font_awesome_flutter:
    path: /Users/benjaminfarquhar/dev/font_awesome_flutter-master

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^1.11.1
  flutter_gen: ^3.0.2
  pedantic: ^1.11.0

flutter:
  uses-material-design: true
  fonts:
    - family: VarelaRound
      fonts:
        - asset: assets/fonts/VarelaRound-Regular.ttf
    - family: Hind
      fonts:
        - asset: assets/fonts/Hind-Medium.ttf
  assets:
    - assets/images/

flutter_gen:
  output: lib/

flutter_icons:
  image_path: "assets/images/launcher_icon_ios.webp"
  android: false
  ios: true

flutter_native_splash:
  image: assets/images/splash_screen.png
  color: "#22F2A6"

adding --verbose to flutter pub run build_runner build:

[ +114 ms] executing: [/Users/benjaminfarquhar/development/flutter/] git -c log.showSignature=false log -n 1
--pretty=format:%H
[  +71 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
[        ] executing: [/Users/benjaminfarquhar/development/flutter/] git tag --points-at
c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
[  +27 ms] Exit code 0 from: git tag --points-at c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
[        ] 2.0.1
[  +59 ms] executing: [/Users/benjaminfarquhar/development/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +15 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/benjaminfarquhar/development/flutter/] git ls-remote --get-url origin
[  +15 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +71 ms] executing: [/Users/benjaminfarquhar/development/flutter/] git rev-parse --abbrev-ref HEAD
[  +30 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +9 ms] executing: sw_vers -productName
[  +21 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[  +20 ms] Exit code 0 from: sw_vers -productVersion
[        ] 11.2.2
[        ] executing: sw_vers -buildVersion
[  +24 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 20D80
[   +9 ms] executing: sysctl hw.optional.arm64
[  +12 ms] Exit code 1 from: sysctl hw.optional.arm64
[        ] sysctl: unknown oid 'hw.optional.arm64'
[  +98 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +58 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +49 ms] Using /Users/benjaminfarquhar/development/flutter/.pub-cache for the pub cache.
[        ] executing: /Users/benjaminfarquhar/development/flutter/bin/cache/dart-sdk/bin/pub run build_runner --verbose
The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
[ +621 ms] "flutter run" took 755ms.
[  +24 ms] pub finished with exit code 65
[  +17 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      _DefaultPub.interactively (package:flutter_tools/src/dart/pub.dart:364:7)
           <asynchronous suspension>
           #2      PackagesForwardCommand.runCommand (package:flutter_tools/src/commands/packages.dart:238:5)
           <asynchronous suspension>
           #3      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:12)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1009:27)
           <asynchronous suspension>
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #6      AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
           <asynchronous suspension>
           #7      CommandRunner.runCommand (package:args/command_runner.dart:197:13)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand.<anonymous closure>
           (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
           <asynchronous suspension>
           #11     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)
           <asynchronous suspension>
           #12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
           <asynchronous suspension>
           #13     run.<anonymous closure> (package:flutter_tools/runner.dart:62:12)
           <asynchronous suspension>
           #14     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #15     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
           <asynchronous suspension>
           #16     runInContext (package:flutter_tools/src/context_runner.dart:73:10)
           <asynchronous suspension>
           #17     main (package:flutter_tools/executable.dart:90:3)
           <asynchronous suspension>
           
           
[ +265 ms] ensureAnalyticsSent: 254ms
[   +3 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 65
like image 203
BeniaminoBaggins Avatar asked Mar 06 '21 08:03

BeniaminoBaggins


2 Answers

Your issue here may be related to the following import

  flutter_gen: ^3.0.2

My analysis here was to use the dependency_overrides implementation on another package (I used image_cropper) and I had the exact same issue.

I didn't work with this library so I can't help you more than that, but I saw issues on the official Flutter Github mentioning this library and the problems it could create when editing the pubspec file.

Edit
Since it may help a lot of people in the future, I created an issue on the flutter_gen Github

Edit 2
A contributor of the flutter_gen package answered to the Github Issue.
You have to replace your flutter_gen import with flutter_gen_runner.

flutter_gen_runner: ^3.0.2
like image 178
FDuhen Avatar answered Oct 17 '22 02:10

FDuhen


Try the following command

flutter pub cache repair
like image 2
YoBo Avatar answered Oct 17 '22 00:10

YoBo