Build: Failed to precompile build_runner:

Created on 23 Jul 2018  路  4Comments  路  Source: dart-lang/build

Hello,
I'm getting these errors while running pub get

Working dir: C:\Users\Mattia\Dropbox\PHPStormProjects\Heroes
D:\Tools\DartSDK\dart-sdk\bin\pub.bat get
Resolving dependencies...
Overriding the upper bound Dart SDK constraint to <=2.0.0-dev.69.1 for the following packages:

auth_header, cli_repl, front_end, jaguar_common, kernel, node_preamble, perf_api, quiver_hashcode, sass, tuple

To disable this you can set the PUB_ALLOW_PRERELEASE_SDK system environment variable to `false`, or you can silence this message by setting it to `quiet`.
Got dependencies!
Precompiling executables...
Failed to precompile build_runner:graph_inspector:
file:///C:/Users/Mattia/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.31.2-alpha.2/lib/src/dart/analysis/library_context.dart:96:34: Error: Can't return a value from a void function.
        return appendLibraryFiles(targetLibrary);
                                 ^
file:///C:/Users/Mattia/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.12/lib/src/fasta/deprecated_problems.dart:128:20: Error: This expression has type 'void' and can't be used.
      await client.close(force: true);
                   ^
file:///C:/Users/Mattia/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.12/lib/src/fasta/deprecated_problems.dart:148:16: Error: This expression has type 'void' and can't be used.
  await client.close(force: true);
               ^
Failed to precompile build_runner:build_runner:
file:///C:/Users/Mattia/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.12/lib/src/fasta/deprecated_problems.dart:128:20: Error: This expression has type 'void' and can't be used.
      await client.close(force: true);
                   ^
file:///C:/Users/Mattia/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.12/lib/src/fasta/deprecated_problems.dart:148:16: Error: This expression has type 'void' and can't be used.
  await client.close(force: true);
               ^
file:///C:/Users/Mattia/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.31.2-alpha.2/lib/src/dart/analysis/library_context.dart:96:34: Error: Can't return a value from a void function.
        return appendLibraryFiles(targetLibrary);
                                 ^
Process finished with exit code 0

Dart SDK Version: 2.0.0-dev.69.1 (Fri Jul 20 18:30:52 2018 +0200) on "windows_x64" (Test on linux too)

My pubspec.yaml:

name: Heroes
description: An absolute bare-bones web app.
version: 0.0.1
homepage: https://github.com/Hexer10
author: Mattia <[email protected]>

environment:
  sdk: '>=2.0.0-dev.68.0 <2.0.0'

dependencies:
    angular: ^5.0.0-beta
    angular_forms: ^2.0.0-beta
    angular_router: ^2.0.0-alpha+15
    http: ^0.11.0
    stream_transform: ^0.0.6
    angular_components: ^0.9.0-beta+1
    jaguar: ^2.1.30

dev_dependencies:
    angular_test: ^2.0.0-beta
    build_runner: ^0.9.2
    build_test: ^0.10.2
    build_web_compilers: ^0.4.1

Most helpful comment

Running pub upgrade fixes the issue

All 4 comments

Running pub upgrade fixes the issue

For me: flutter packages pub upgrade

Hello. I am getting similar issue while using inspectdr()

inspectdr()
[ Info: Precompiling InspectDR [d0351b0e-4b05-5898-87b3-e2a8edfddd1d]
ERROR: LoadError: LoadError: error compiling top-level scope: could not load library "libgobject-2.0"
dlopen(libgobject-2.0.dylib, 1): image not found
Stacktrace:
[1] include at ./boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at ./loading.jl:1041
[3] include at ./sysimg.jl:29 [inlined]
[4] include(::String) at /Users/pujaagarwala/.julia/packages/Gtk/RwVPb/src/Gtk.jl:2
[5] top-level scope at none:0
[6] include at ./boot.jl:317 [inlined]
[7] include_relative(::Module, ::String) at ./loading.jl:1041
[8] include(::Module, ::String) at ./sysimg.jl:29
[9] top-level scope at none:2
[10] eval at ./boot.jl:319 [inlined]
[11] eval(::Expr) at ./client.jl:389
[12] top-level scope at ./none:3
in expression starting at /Users/pujaagarwala/.julia/packages/Gtk/RwVPb/src/GLib/GLib.jl:49
in expression starting at /Users/pujaagarwala/.julia/packages/Gtk/RwVPb/src/Gtk.jl:7
ERROR: LoadError: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to /Users/pujaagarwala/.julia/compiled/v1.0/Gtk/Vjnq0.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1187
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:855
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:837
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1041
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] top-level scope at none:2
[12] eval at ./boot.jl:319 [inlined]
[13] eval(::Expr) at ./client.jl:389
[14] top-level scope at ./none:3
in expression starting at /Users/pujaagarwala/.julia/packages/InspectDR/0YS2l/src/InspectDR.jl:25
ERROR: Failed to precompile InspectDR [d0351b0e-4b05-5898-87b3-e2a8edfddd1d] to /Users/pujaagarwala/.julia/compiled/v1.0/InspectDR/ttblj.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1187
[4] macro expansion at ./logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at ./loading.jl:944
[6] require(::Base.PkgId) at ./loading.jl:855
[7] macro expansion at ./logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at ./loading.jl:837
[9] top-level scope at /Users/pujaagarwala/.julia/packages/Plots/rmogG/src/backends.jl:320
[10] eval at ./boot.jl:319 [inlined]
[11] _initialize_backend(::Plots.InspectDRBackend) at /Users/pujaagarwala/.julia/packages/Plots/rmogG/src/backends.jl:319
[12] backend(::Plots.InspectDRBackend) at /Users/pujaagarwala/.julia/packages/Plots/rmogG/src/backends.jl:196
[13] backend(::Symbol) at /Users/pujaagarwala/.julia/packages/Plots/rmogG/src/backends.jl:209
[14] inspectdr() at /Users/pujaagarwala/.julia/packages/Plots/rmogG/src/backends.jl:29
[15] top-level scope at none:0

@Puja01 this is a dart project, it looks like you are trying to file a bug against a Julia project of some sort

Was this page helpful?
0 / 5 - 0 ratings