# ERROR: LoadError: Failed to precompile

**URL:** <https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043>\
**Category:** General Usage\
**Created:** [March 17, 2022, 5:56pm UTC](https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043 "2022-03-17T17:56:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [March 17, 2022, 5:56pm UTC](https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043/1 "2022-03-17T17:56:05Z")

</div>

Attempting to instantiate an old environment I get a number of packages that fail with the error in the subject. The trace information that is printed out doesn’t offer any clue I can understand about the actual source of the problem.

I would appreciate any advice on how to diagnose the problem, or even to solve it 😃

This is something I was working on a year or two ago, on a different system and earlier julia and packages. My overall plan was to first get it working with the package versions at the time, and then update the packages and my code as necessary.

Operations are inside VSCode with julia 1.7.2. Project.toml is at the bottom of this message; it uses UUIDs for the version specification.

Some notes about the output that follows:

1. The very first item seems to list 2 different log files. The first exists, but is empty. I looked for the 2nd assuming I should replace the end of the 1st file name, but don’t see it.
2. What happens after re-resolving?
3. The 2nd round errors, after `Pkg.precompile()` are chattier, but not helpfully so; the stack trace seems to be for the precompiler failing, not what it failed on.

```julia
   Building Conda ────→ `C:\Users\rdboylan\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\7a58bb32ce5d85f8bf7559aa7c2842f9aecf52fc\build.log`
a9757e1f86cbbff81\build.log`
┌ Warning: Could not use exact versions of packages in manifest, re-resolving
└ @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\Operations.jl:1488
    Building RCall ────→ `C:\Users\rdboylan\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\3a0e886953024454e9f489e309568e134dc7e6ed\build.log`
┌ Warning: Could not use exact versions of packages in manifest, re-resolving
└ @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\Operations.jl:1488
    Building HDF5 ─────→ `C:\Users\rdboylan\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\0713cbabdf855852dfab3ce6447c87145f3d9ea8\build.log`
┌ Warning: Could not use exact versions of packages in manifest, re-resolving
└ @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\Operations.jl:1488
Precompiling project...
  Progress [========================================>] 160/160
  ✗ FileIO
  ✗ FileIO
  ✗ StatFiles
  ✗ JLD
  ✗ RData
  ✗ Revise
  ✗ FlameGraphs
  ✗ Gtk
  ✗ GtkReactive
  ✗ ProfileView
  151 dependencies successfully precompiled in 55 seconds (1 already precompiled)
  9 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

julia> import Pkg; Pkg.precompile()
Precompiling project...
  Progress [========================================>] 9/9
  ✗ FileIO
  ✗ FileIO
  ✗ Revise
  ✗ Gtk
  ✗ StatFiles
  ✗ JLD
  ✗ FlameGraphs
  ✗ RData
  ✗ GtkReactive
  ✗ ProfileView
  0 dependencies successfully precompiled in 22 seconds (152 already precompiled)

ERROR: The following 4 direct dependencies failed to precompile:

Revise [295af30f-e4ad-537b-8983-00126c2a3abe]

Failed to precompile Revise [295af30f-e4ad-537b-8983-00126c2a3abe] to C:\Users\rdboylan\.julia\compiled\v1.7\Revise\jl_CF5E.tmp.
ERROR: LoadError: AssertionError: precompile(Tuple{mbody.sig.parameters[1], Symbol, Bool, Bool, Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(methods_by_execution!), Any, MI, DocExprs, Module, Expr})
Stacktrace:
  [1] _precompile_()
    @ Revise C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\precompile.jl:52
  [2] top-level scope
    @ C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\packagedef.jl:1385
  [3] include(mod::Module, _path::String)
    @ Base .\Base.jl:418
  [4] include(x::String)
    @ Revise C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\Revise.jl:1
  [5] top-level scope
    @ C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\Revise.jl:20
  [6] include
    @ .\Base.jl:418 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1318
  [8] top-level scope
    @ none:1
  [9] eval
    @ .\boot.jl:373 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [11] top-level scope
    @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\packagedef.jl:1385
in expression starting at C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\Revise.jl:1

```

Basically the same error is repeated for each of the failing packages.

Project.toml:

```julia
name = "MyFirst"
uuid = "074633b0-7e9c-11e9-0fe2-650315f203db"
authors = ["Ross Boylan <ross.boylan@ucsf.edu>"]
version = "0.1.0"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
InteractiveCodeSearch = "54eb57ff-b09b-5185-b2f4-7a93509e494f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NLSolversBase = "d41bc354-129a-5804-8e4c-c37616107c6c"
NamedArrays = "86f7a689-2022-50b4-a561-43c23ac3c673"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
ProfileView = "c46f51b8-102a-5cf2-8d2c-8597cb0e0da7"
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"
RData = "df47a6cb-8c03-5eed-afd8-b6050d6c41da"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
StatFiles = "1463e38c-9381-5320-bcd4-4134955f093a"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

```

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [March 17, 2022, 6:14pm UTC](https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043/2 "2022-03-17T18:14:16Z")

</div>

Can you try removing `InteractiveCodeSearch` and trying again? I’m getting similar errors but they mention `InteractiveCodeSearch`. To help pin down the error.

---

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [March 17, 2022, 6:35pm UTC](https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043/3 "2022-03-17T18:35:33Z")

</div>

Removing it doesn’t seem to have changed much. It did produce some interesting info about my Projects file.

```julia
(MyFirst) pkg> remove InteractiveCodeSearch
┌ Warning: The active manifest file at `J:\Users\rdboylan\Documents\KBD2\MyFirst\Manifest.toml` has an old format that is being maintained.
│ To update to the new format run `Pkg.upgrade_manifest()` which will upgrade the format without re-resolving.
└ @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\manifest.jl:287
    Updating `J:\Users\rdboylan\Documents\KBD2\MyFirst\Project.toml`
  [54eb57ff] - InteractiveCodeSearch v0.3.2
    Updating `J:\Users\rdboylan\Documents\KBD2\MyFirst\Manifest.toml`
  [54eb57ff] - InteractiveCodeSearch v0.3.2
[ Info: We haven't cleaned this depot up for a bit, running Pkg.gc()...
      Active manifest files: 1 found
      Active artifact files: 78 found
      Active scratchspaces: 8 found
     Deleted no artifacts, repos, packages or scratchspaces

(MyFirst) pkg> st
     Project MyFirst v0.1.0
      Status `J:\Users\rdboylan\Documents\KBD2\MyFirst\Project.toml`
  [324d7699] CategoricalArrays v0.8.3
  [a93c6f00] DataFrames v0.21.7
  [31c24e10] Distributions v0.23.12
  [f6369f11] ForwardDiff v0.10.12
  [38e38edf] GLM v1.3.10
  [d41bc354] NLSolversBase v7.7.1
  [86f7a689] NamedArrays v0.9.4
  [429524aa] Optim v1.2.0
  [c46f51b8] ProfileView v0.6.7
  [6f49c342] RCall v0.13.9
  [df47a6cb] RData v0.7.2
  [295af30f] Revise v3.1.4
  [1463e38c] StatFiles v0.8.0
  [2913bbd2] StatsBase v0.33.2
  [3eaba693] StatsModels v0.6.15
  [bd369af6] Tables v1.1.0
  [37e2e46d] LinearAlgebra

julia> Pkg.precompile()
Precompiling project...
  ✗ FileIO
  ✗ Revise
  ✗ Gtk
  ✗ StatFiles
  ✗ JLD
  ✗ FlameGraphs
  ✗ RData
  ✗ GtkReactive
  ✗ ProfileView
  0 dependencies successfully precompiled in 25 seconds (151 already precompiled)

ERROR: The following 4 direct dependencies failed to precompile:

Revise [295af30f-e4ad-537b-8983-00126c2a3abe]

Failed to precompile Revise [295af30f-e4ad-537b-8983-00126c2a3abe] to C:\Users\rdboylan\.julia\compiled\v1.7\Revise\jl_1CFE.tmp.
ERROR: LoadError: AssertionError: precompile(Tuple{mbody.sig.parameters[1], Symbol, Bool, Bool, Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(methods_by_execution!), Any, MI, DocExprs, Module, Expr})
Stacktrace:
  [1] _precompile_()
    @ Revise C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\precompile.jl:52
  [2] top-level scope
    @ C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\packagedef.jl:1385
  [3] include(mod::Module, _path::String)
    @ Base .\Base.jl:418
  [4] include(x::String)
    @ Revise C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\Revise.jl:1
  [5] top-level scope
    @ C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\Revise.jl:20
  [6] include
    @ .\Base.jl:418 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1318
  [8] top-level scope
    @ none:1
  [9] eval
    @ .\boot.jl:373 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [11] top-level scope
    @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\packagedef.jl:1385
in expression starting at C:\Users\rdboylan\.julia\packages\Revise\qYvgD\src\Revise.jl:1

StatFiles [1463e38c-9381-5320-bcd4-4134955f093a]

Failed to precompile StatFiles [1463e38c-9381-5320-bcd4-4134955f093a] to C:\Users\rdboylan\.julia\compiled\v1.7\StatFiles\jl_2F5F.tmp.
ERROR: LoadError: AssertionError: precompile(f, (Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(load), String))
Stacktrace:
 [1] _precompile_()
   @ FileIO C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\precompile.jl:46
 [2] top-level scope
   @ C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\FileIO.jl:67
 [3] include
   @ .\Base.jl:418 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
   @ Base .\loading.jl:1318
 [5] top-level scope
   @ none:1
 [6] eval
   @ .\boot.jl:373 [inlined]
 [7] eval(x::Expr)
   @ Base.MainInclude .\client.jl:453
 [8] top-level scope
   @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\FileIO.jl:1
ERROR: LoadError: Failed to precompile FileIO [5789e2e9-d7fb-5bc7-8068-2c6fae9b9549] to C:\Users\rdboylan\.julia\compiled\v1.7\FileIO\jl_326A.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:997
  [7] include
    @ .\Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\StatFiles\gxVDC\src\StatFiles.jl:1

RData [df47a6cb-8c03-5eed-afd8-b6050d6c41da]

Failed to precompile RData [df47a6cb-8c03-5eed-afd8-b6050d6c41da] to C:\Users\rdboylan\.julia\compiled\v1.7\RData\jl_2F81.tmp.
ERROR: LoadError: AssertionError: precompile(f, (Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(load), String))
Stacktrace:
 [1] _precompile_()
   @ FileIO C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\precompile.jl:46
 [2] top-level scope
   @ C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\FileIO.jl:67
 [3] include
   @ .\Base.jl:418 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
   @ Base .\loading.jl:1318
 [5] top-level scope
   @ none:1
 [6] eval
   @ .\boot.jl:373 [inlined]
 [7] eval(x::Expr)
   @ Base.MainInclude .\client.jl:453
 [8] top-level scope
   @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\FileIO.jl:1
ERROR: LoadError: Failed to precompile FileIO [5789e2e9-d7fb-5bc7-8068-2c6fae9b9549] to C:\Users\rdboylan\.julia\compiled\v1.7\FileIO\jl_33E1.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:997
  [7] include
    @ .\Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\RData\sZSPi\src\RData.jl:1

ProfileView [c46f51b8-102a-5cf2-8d2c-8597cb0e0da7]

Failed to precompile ProfileView [c46f51b8-102a-5cf2-8d2c-8597cb0e0da7] to C:\Users\rdboylan\.julia\compiled\v1.7\ProfileView\jl_58E5.tmp.
ERROR: LoadError: AssertionError: precompile(f, (Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(load), String))
Stacktrace:
 [1] _precompile_()
   @ FileIO C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\precompile.jl:46
 [2] top-level scope
   @ C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\FileIO.jl:67
 [3] include
   @ .\Base.jl:418 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
   @ Base .\loading.jl:1318
 [5] top-level scope
   @ none:1
 [6] eval
   @ .\boot.jl:373 [inlined]
 [7] eval(x::Expr)
   @ Base.MainInclude .\client.jl:453
 [8] top-level scope
   @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\FileIO\wN5rD\src\FileIO.jl:1
ERROR: LoadError: Failed to precompile FileIO [5789e2e9-d7fb-5bc7-8068-2c6fae9b9549] to C:\Users\rdboylan\.julia\compiled\v1.7\FileIO\jl_5F27.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:997
  [7] include
    @ .\Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\rdboylan\.julia\packages\FlameGraphs\KTpPA\src\FlameGraphs.jl:1
ERROR: LoadError: Failed to precompile FlameGraphs [08572546-2f56-4bcf-ba4e-bab62c3a3f89] to C:\Users\rdboylan\.julia\compiled\v1.7\FlameGraphs\jl_595B.tmp.
# etc

```

---

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [March 17, 2022, 7:19pm UTC](https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043/4 "2022-03-17T19:19:04Z")

</div>

I tried the format upgrade suggested by the previous output. precompiling produced one new message that might be a clue to what’s going on, but then (based on a quick scan) the same errors as before.

```julia
julia> Pkg.upgrade_manifest()
     Updated Format of manifest file at `J:\Users\rdboylan\Documents\KBD2\MyFirst\Manifest.toml` updated from v1.0 to v2.0

julia> Pkg.precompile()
┌ Warning: The active manifest file is missing a julia version entry. Dependencies may have been resolved with a different julia version.
└ @ J:\Users\rdboylan\Documents\KBD2\MyFirst\Manifest.toml:0

```

Really, `Revise` and `ProfileView` should not be part of the package either; they are there as a development convenience. Removing them would probably take out some other packages as well.

I then removed those packages; the result was a shorter list of packages that failed to precompile, but the errors looked the same as before:

```julia
julia> Pkg.precompile()
Precompiling project...
  ✗ FileIO
  ✗ StatFiles
  ✗ RData
  0 dependencies successfully precompiled in 134 seconds (71 already precompiled)

ERROR: The following 2 direct dependencies failed to precompile:

StatFiles [1463e38c-9381-5320-bcd4-4134955f093a]

Failed to precompile StatFiles [1463e38c-9381-5320-bcd4-4134955f093a] to C:\Users\rdboylan\.julia\compiled\v1.7\StatFiles\jl_5D09.tmp.
ERROR: LoadError: AssertionError: precompile(f, (Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(load), String))
# etc

```

---

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [March 18, 2022, 1:55am UTC](https://discourse.julialang.org/t/error-loaderror-failed-to-precompile/78043/5 "2022-03-18T01:55:55Z")

</div>

I have a partial explanation. `import StatFiles` alone produced an unhelpful error like the ones above. But `import FileIO` produced a dialog that said, roughly, “You do not have a version available but one is in the registry. Do you want to use that? (y/n)”. (VSCode doesn’t seem to have preserved the exchange in the terminal window, or even the `import` command that started it 😬.) I said yes, and a large number of builds and (I think) upgrades followed. After that I could `import StatFiles` or `import RData` without problem.

Judging from `Manifest.toml` the UUID of `FileIO` has not changed. The version was 1.4.3 and is now 1.13.0. Maybe 1.4.3 is no longer available, or marked as inconsistent with julia 1.7?

At any rate, it seems the compilation of the higher-level packages failed because the right version of `FileIO`, required by those packages, was not available, or because it couldn’t handle the interactive dialog or defaulted to no as the response, or because what I actually did changed versions, contrary to the intent of the control files.

Since the problem wasn’t exactly in `StatFiles`, but in the dependency relations, there was no line in `StatFiles` that an error could have reported as the problem. So it didn’t (well, it referred to line 1).

At any rate, the whole “you can rebuild using the exact versions” didn’t work out for me. Maybe if I’d used the version of julia I had originally I would have had better luck.

I have yet to verify I can actually run the thing; I need to review all the upgrades.

For reference, here a list of them (what does the `~` and double-arrow mean?):

```julia
    Updating registry at `C:\Users\rdboylan\.julia\registries\General.toml`
   Resolving package versions...
   Installed ReadStat_jll ─────────── v1.1.5+0
   Installed DiffRules ────────────── v1.0.2
   Installed IfElse ───────────────── v0.1.1
   Installed StatsFuns ────────────── v0.9.8
   Installed NaNMath ──────────────── v0.3.7
   Installed DiffResults ──────────── v1.0.3
   Installed PositiveFactorizations ─ v0.2.4
   Installed StaticArrays ─────────── v0.12.5
   Installed QuadGK ───────────────── v2.4.2
   Installed FillArrays ───────────── v0.9.7
   Installed TranscodingStreams ───── v0.9.6
   Installed ReadStat ─────────────── v1.1.1
   Installed ArrayInterface ───────── v5.0.5
   Installed LineSearches ─────────── v7.1.1
   Installed FileIO ───────────────── v1.13.0
   Installed LogExpFunctions ──────── v0.2.5
   Installed MacroTools ───────────── v0.5.9
   Installed Static ───────────────── v0.6.0
   Installed Parameters ───────────── v0.12.3
   Installed TableTraitsUtils ─────── v1.0.2
   Installed FiniteDiff ───────────── v2.11.0
  Downloaded artifact: ReadStat
    Updating `J:\Users\rdboylan\Documents\KBD2\MyFirst\Project.toml`
  [5789e2e9] + FileIO v1.13.0
    Updating `J:\Users\rdboylan\Documents\KBD2\MyFirst\Manifest.toml`
  [4fba245c] ↑ ArrayInterface v2.13.3 ⇒ v5.0.5
  [34da2185] ↑ Compat v3.19.0 ⇒ v3.42.0
  [8f4d0f93] ↑ Conda v1.4.1 ⇒ v1.7.0
  [9a962f9c] ↑ DataAPI v1.3.0 ⇒ v1.9.0
  [864edb3b] ↑ DataStructures v0.18.7 ⇒ v0.18.11
  [163ba53b] ↑ DiffResults v1.0.2 ⇒ v1.0.3
  [b552c78f] ↑ DiffRules v1.0.1 ⇒ v1.0.2
  [ffbed154] + DocStringExtensions v0.8.6
  [e2ba6199] ↑ ExprTools v0.1.2 ⇒ v0.1.8
  [8f5d6c58] - EzXML v1.1.0
  [5789e2e9] ↑ FileIO v1.4.3 ⇒ v1.13.0
  [1a297f60] ↑ FillArrays v0.9.6 ⇒ v0.9.7
  [6a86dc24] ↑ FiniteDiff v2.7.0 ⇒ v2.11.0
  [615f187c] + IfElse v0.1.1
  [842dd82b] + InlineStrings v1.1.2
  [41ab1584] ↑ InvertedIndices v1.0.0 ⇒ v1.1.0
  [692b3bcd] + JLLWrappers v1.4.1
  [682c06a0] ↑ JSON v0.21.1 ⇒ v0.21.3
  [d3d80556] ↑ LineSearches v7.1.0 ⇒ v7.1.1
  [2ab3a3ac] + LogExpFunctions v0.2.5
  [1914dd2f] ↑ MacroTools v0.5.5 ⇒ v0.5.9
  [e1d29d7a] ↑ Missings v0.4.4 ⇒ v0.4.5
  [78c3b35d] ↑ Mocking v0.7.1 ⇒ v0.7.3
  [77ba4419] ↑ NaNMath v0.3.4 ⇒ v0.3.7
  [bac558e1] ↑ OrderedCollections v1.3.1 ⇒ v1.4.1
  [d96e819e] ↑ Parameters v0.12.1 ⇒ v0.12.3
  [69de0a69] ↑ Parsers v1.0.11 ⇒ v2.2.3
  [85a6dd25] ↑ PositiveFactorizations v0.2.3 ⇒ v0.2.4
  [21216c6a] + Preferences v1.2.5
  [1fd47b50] ↑ QuadGK v2.4.1 ⇒ v2.4.2
  [d71aba96] ↑ ReadStat v1.0.2 ⇒ v1.1.1
  [3cdcf5f2] ↑ RecipesBase v1.1.0 ⇒ v1.2.1
  [ae029012] ↑ Requires v1.0.3 ⇒ v1.3.0
  [79098fc4] ↑ Rmath v0.6.1 ⇒ v0.7.0
  [aedffcd0] + Static v0.6.0
  [90137ffa] ↑ StaticArrays v0.12.4 ⇒ v0.12.5
  [4c63d2b9] ↑ StatsFuns v0.9.5 ⇒ v0.9.8
  [856f2bd8] ↑ StructTypes v1.1.0 ⇒ v1.8.1
  [3783bdb8] ↑ TableTraits v1.0.0 ⇒ v1.0.1
  [382cd787] ↑ TableTraitsUtils v1.0.1 ⇒ v1.0.2
  [f269a46b] ↑ TimeZones v1.4.0 ⇒ v1.7.2
  [3bb67fe8] ↑ TranscodingStreams v0.9.5 ⇒ v0.9.6
  [81def892] ↑ VersionParsing v1.2.0 ⇒ v1.3.0
  [94ce4f54] ↑ Libiconv_jll v1.16.0+6 ⇒ v1.16.1+1
  [efe28fd5] ↑ OpenSpecFun_jll v0.5.3+3 ⇒ v0.5.5+0
  [a4dc8951] ↑ ReadStat_jll v1.1.1+0 ⇒ v1.1.5+0
  [f50d1b31] ↑ Rmath_jll v0.2.2+1 ⇒ v0.3.0+0
  [02c8fc9c] - XML2_jll v2.9.10+2
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [f43a241f] + Downloads
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL
  [ca575930] + NetworkOptions
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [e66e0078] ~ CompilerSupportLibraries_jll v0.3.3+0 ⇒ 
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [4536629a] + OpenBLAS_jll
  [83775a58] ~ Zlib_jll v1.2.11+16 ⇒ 
  [8e850b90] + libblastrampoline_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll
Precompiling project...
  61 dependencies successfully precompiled in 25 seconds (22 already precompiled)

```
