# Encountering Precompilation Error Messages When Adding NeuralPDE Package in Julia

**URL:** <https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623>\
**Category:** General Usage\
**Tags:** question, sciml\
**Created:** [January 10, 2024, 2:25pm UTC](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623 "2024-01-10T14:25:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edylennyy\_Edy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/edylennyy_edy/32/206102_2.png) [@Edylennyy\_Edy](https://discourse.julialang.org/u/Edylennyy_Edy)\
**Post date:** [January 10, 2024, 2:25pm UTC](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623/1 "2024-01-10T14:25:49Z")

</div>

I’m currently working on a Julia project where I need to use the NeuralPDE package. However, when I try to add and precompile this package, I’m encountering several error messages related to dependencies. Here’s a summary of what happens during the precompilation process:

Precompiling project…  
✗ NonlinearSolve  
✗ OrdinaryDiffEq  
✗ StochasticDiffEq  
✗ ModelingToolkit  
✗ AdvancedHMC → AdvancedHMCOrdinaryDiffEqExt  
✗ Optimization → OptimizationMTKExt  
✗ NeuralPDE  
0 dependencies successfully precompiled in 56 seconds. 333 already precompiled.  
7 dependencies errored.  
For a report of the errors see `julia> err`. To retry use `pkg> precompile`

julia\> err:

err  
PkgPrecompileError: The following 1 direct dependency failed to precompile:

NeuralPDE [315f7962-48a3-4962-8226-d0f33b1235f0]

Failed to precompile NeuralPDE [315f7962-48a3-4962-8226-d0f33b1235f0] to “/home/edward/.julia/compiled/v1.10/NeuralPDE/jl\_afTPE5”.  
ERROR: LoadError: Invalid Tag object:  
Expected ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}}, Float32},  
Observed ForwardDiff.Tag{Bool, Float32}.  
Stacktrace:  
[1] checktag(::Type{ForwardDiff.Tag{Bool, Float32}}, f::NonlinearSolve.JacobianWrapper{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}}, x::Vector{Float32})  
@ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/config.jl:34  
[2] jacobian!(result::Matrix{Float32}, f!::Function, y::Vector{Float32}, x::Vector{Float32}, cfg::ForwardDiff.JacobianConfig{ForwardDiff.Tag{Bool, Float32}, Float32, 1, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}}}, ::Val{true})  
@ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:76  
[3] jacobian!(result::Matrix{Float32}, f!::Function, y::Vector{Float32}, x::Vector{Float32}, cfg::ForwardDiff.JacobianConfig{ForwardDiff.Tag{Bool, Float32}, Float32, 1, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}}})  
@ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:76  
[4] sparse\_jacobian!(J::Matrix{Float32}, ::ADTypes.AutoForwardDiff{0, Bool}, cache::SparseDiffTools.ForwardDiffJacobianCache{SparseDiffTools.NoMatrixColoring, ForwardDiff.JacobianConfig{ForwardDiff.Tag{Bool, Float32}, Float32, 1, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}}}, Nothing, Vector{Float32}, Vector{Float32}}, f!::NonlinearSolve.JacobianWrapper{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}}, fx::Vector{Float32}, x::Vector{Float32})  
@ SparseDiffTools ~/.julia/packages/SparseDiffTools/CsonI/src/highlevel/forward\_mode.jl:70  
[5] jacobian!!(J::Matrix{Float32}, cache::NonlinearSolve.NewtonRaphsonCache{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, NonlinearSolve.NewtonRaphson{nothing, ADTypes.AutoForwardDiff{0, Bool}, Nothing, typeof(NonlinearSolve.DEFAULT\_PRECS), NonlinearSolve.LineSearch{LineSearches.Static, ADTypes.AutoFiniteDiff{Val{:forward}, Val{:forward}, Val{:hcentral}}, Bool}}, Vector{Float32}, Vector{Float32}, Vector{Float32}, Vector{Float32}, Vector{Float32}, NonlinearSolve.JacobianWrapper{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}}, LinearSolve.LinearCache{Matrix{Float32}, Vector{Float32}, Vector{Float32}, SciMLBase.NullParameters, LinearSolve.DefaultLinearSolver, LinearSolve.DefaultLinearSolverInit{LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, LinearAlgebra.QRCompactWY{Float32, Matrix{Float32}, Matrix{Float32}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, Tuple{LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, Vector{Int64}}, Nothing, Nothing, Nothing, LinearAlgebra.SVD{Float32, Float32, Matrix{Float32}, Vector{Float32}}, LinearAlgebra.Cholesky{Float32, Matrix{Float32}}, LinearAlgebra.Cholesky{Float32, Matrix{Float32}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int32}}, Base.RefValue{Int32}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Base.RefValue{Int64}}, LinearAlgebra.QRPivoted{Float32, Matrix{Float32}, Vector{Float32}, Vector{Int64}}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float32, Vector{Float32}}}, LinearAlgebra.Diagonal{Float32, Vector{Float32}}, Float32, Bool}, Matrix{Float32}, SparseDiffTools.ForwardDiffJacobianCache{SparseDiffTools.NoMatrixColoring, ForwardDiff.JacobianConfig{ForwardDiff.Tag{Bool, Float32}, Float32, 1, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}}}, Nothing, Vector{Float32}, Vector{Float32}}, Bool, typeof(NonlinearSolve.DEFAULT\_NORM), Float32, SciMLBase.NonlinearProblem{Vector{Float32}, true, Vector{Float32}, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardNonlinearProblem}, NonlinearSolve.LineSearchCache{NonlinearSolve.var"#eval\_f#18"{Vector{Float32}, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}, Val{true}, Vector{Float32}}, Nothing, Nothing, Nothing, Float32, NonlinearSolve.LineSearch{LineSearches.Static, ADTypes.AutoFiniteDiff{Val{:forward}, Val{:forward}, Val{:hcentral}}, Bool}}})  
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/6NIAV/src/jacobian.jl:40  
[6] perform\_step!(cache::NonlinearSolve.NewtonRaphsonCache{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, NonlinearSolve.NewtonRaphson{nothing, ADTypes.AutoForwardDiff{0, Bool}, Nothing, typeof(NonlinearSolve.DEFAULT\_PRECS), NonlinearSolve.LineSearch{LineSearches.Static, ADTypes.AutoFiniteDiff{Val{:forward}, Val{:forward}, Val{:hcentral}}, Bool}}, Vector{Float32}, Vector{Float32}, Vector{Float32}, Vector{Float32}, Vector{Float32}, NonlinearSolve.JacobianWrapper{true, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}}, LinearSolve.LinearCache{Matrix{Float32}, Vector{Float32}, Vector{Float32}, SciMLBase.NullParameters, LinearSolve.DefaultLinearSolver, LinearSolve.DefaultLinearSolverInit{LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, LinearAlgebra.QRCompactWY{Float32, Matrix{Float32}, Matrix{Float32}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, Tuple{LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, Vector{Int64}}, Nothing, Nothing, Nothing, LinearAlgebra.SVD{Float32, Float32, Matrix{Float32}, Vector{Float32}}, LinearAlgebra.Cholesky{Float32, Matrix{Float32}}, LinearAlgebra.Cholesky{Float32, Matrix{Float32}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int32}}, Base.RefValue{Int32}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Base.RefValue{Int64}}, LinearAlgebra.QRPivoted{Float32, Matrix{Float32}, Vector{Float32}, Vector{Int64}}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float32, Vector{Float32}}}, LinearAlgebra.Diagonal{Float32, Vector{Float32}}, Float32, Bool}, Matrix{Float32}, SparseDiffTools.ForwardDiffJacobianCache{SparseDiffTools.NoMatrixColoring, ForwardDiff.JacobianConfig{ForwardDiff.Tag{Bool, Float32}, Float32, 1, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{Bool, Float32}, Float32, 1}}}}, Nothing, Vector{Float32}, Vector{Float32}}, Bool, typeof(NonlinearSolve.DEFAULT\_NORM), Float32, SciMLBase.NonlinearProblem{Vector{Float32}, true, Vector{Float32}, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardNonlinearProblem}, NonlinearSolve.LineSearchCache{NonlinearSolve.var"#eval\_f#18"{Vector{Float32}, SciMLBase.NonlinearFunction{true, SciMLBase.FullSpecialize, NonlinearSolve.var"#53#55", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT\_OBSERVED\_NO\_TIME), Nothing, Nothing, Nothing}, Vector{Float32}, Val{true}, Vector{Float32}}, Nothing, Nothing, Nothing, Float32, NonlinearSolve.LineSearch{LineSearches.Static, ADTypes.AutoFiniteDiff{Val{:forward}, Val{:forward}, Val{:hcentral}}, Bool}}})  
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/6NIAV/src/raphson.jl:88  
[7] solve!  
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/6NIAV/src/raphson.jl:136 [inlined]  
[8] #\_\_solve#1  
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/6NIAV/src/NonlinearSolve.jl:34 [inlined]  
[9] \_\_solve  
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/6NIAV/src/NonlinearSolve.jl:31 [inlined]  
[10] #solve\_call#34  
@ DiffEqBase ~/.julia/packages/DiffEqBase/s433k/src/solve.jl:559 [inlined]  
[11] solve\_call  
@ DiffEqBase ~/.julia/packages/DiffEqBase/s433k/src/solve.jl:529 [inlined]  
[12] #solve\_up#42  
@ DiffEqBase ~/.julia/packages/DiffEqBase/s433k/src/solve.jl:1028 [inlined]  
[13] solve\_up  
@ DiffEqBase ~/.julia/packages/DiffEqBase/s433k/src/solve.jl:993 [inlined]  
[14] #solve#41  
@ DiffEqBase ~/.julia/packages/DiffEqBase/s433k/src/solve.jl:987 [inlined]  
[15] macro expansion  
@ ~/.julia/packages/NonlinearSolve/6NIAV/src/NonlinearSolve.jl:61 [inlined]  
[16] macro expansion  
@ ~/.julia/packages/PrecompileTools/kmH5L/src/workloads.jl:78 [inlined]  
[17] top-level scope  
@ ~/.julia/packages/NonlinearSolve/6NIAV/src/NonlinearSolve.jl:48  
[18] include  
@ Base ./Base.jl:495 [inlined]  
[19] 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, UInt128}}, source::String)  
@ Base ./loading.jl:2216  
[20] top-level scope  
@ stdin:3  
in expression starting at /home/edward/.julia/packages/NonlinearSolve/6NIAV/src/NonlinearSolve.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile NonlinearSolve [8913a72c-1f9b-4ce2-8d82-65094dcecaec] to “/home/edward/.julia/compiled/v1.10/NonlinearSolve/jl\_doA7Aj”.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:35  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, keep\_loaded\_modules::Bool)  
@ Base ./loading.jl:2462  
[3] compilecache  
@ Base ./loading.jl:2334 [inlined]  
[4] (::Base.var"#968#969"{Base.PkgId})()  
@ Base ./loading.jl:1968  
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale\_age::Int64, wait::Bool})  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93  
[6] #mkpidlock#6  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]  
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale\_age::Int64})  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111  
[8] #invokelatest#2  
@ Base ./essentials.jl:889 [inlined]  
[9] invokelatest  
@ Base ./essentials.jl:884 [inlined]  
[10] maybe\_cachefile\_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale\_age::Int64)  
@ Base ./loading.jl:2977  
[11] maybe\_cachefile\_lock  
@ Base ./loading.jl:2974 [inlined]  
[12] \_require(pkg::Base.PkgId, env::String)  
@ Base ./loading.jl:1964  
[13] \_\_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1806  
[14] #invoke\_in\_world#3  
@ Base ./essentials.jl:921 [inlined]  
[15] invoke\_in\_world  
@ Base ./essentials.jl:918 [inlined]  
[16] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1797  
[17] macro expansion  
@ Base ./loading.jl:1784 [inlined]  
[18] macro expansion  
@ Base ./lock.jl:267 [inlined]  
[19] \_\_require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1747  
[20] #invoke\_in\_world#3  
@ Base ./essentials.jl:921 [inlined]  
[21] invoke\_in\_world  
@ Base ./essentials.jl:918 [inlined]  
[22] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1740  
[23] include  
@ Base ./Base.jl:495 [inlined]  
[24] 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, UInt128}}, source::String)  
@ Base ./loading.jl:2216  
[25] top-level scope  
@ stdin:3  
in expression starting at /home/edward/.julia/packages/OrdinaryDiffEq/FFFcA/src/OrdinaryDiffEq.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to “/home/edward/.julia/compiled/v1.10/OrdinaryDiffEq/jl\_vYV6yK”.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:35  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, keep\_loaded\_modules::Bool)  
@ Base ./loading.jl:2462  
[3] compilecache  
@ Base ./loading.jl:2334 [inlined]  
[4] (::Base.var"#968#969"{Base.PkgId})()  
@ Base ./loading.jl:1968  
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale\_age::Int64, wait::Bool})  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93  
[6] #mkpidlock#6  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]  
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale\_age::Int64})  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111  
[8] #invokelatest#2  
@ Base ./essentials.jl:889 [inlined]  
[9] invokelatest  
@ Base ./essentials.jl:884 [inlined]  
[10] maybe\_cachefile\_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale\_age::Int64)  
@ Base ./loading.jl:2977  
[11] maybe\_cachefile\_lock  
@ Base ./loading.jl:2974 [inlined]  
[12] \_require(pkg::Base.PkgId, env::String)  
@ Base ./loading.jl:1964  
[13] \_\_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1806  
[14] #invoke\_in\_world#3  
@ Base ./essentials.jl:921 [inlined]  
[15] invoke\_in\_world  
@ Base ./essentials.jl:918 [inlined]  
[16] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1797  
[17] macro expansion  
@ Base ./loading.jl:1784 [inlined]  
[18] macro expansion  
@ Base ./lock.jl:267 [inlined]  
[19] \_\_require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1747  
[20] #invoke\_in\_world#3  
@ Base ./essentials.jl:921 [inlined]  
[21] invoke\_in\_world  
@ Base ./essentials.jl:918 [inlined]  
[22] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1740  
[23] include(mod::Module, \_path::String)  
@ Base ./Base.jl:495  
[24] include(x::String)  
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/BsHty/src/ModelingToolkit.jl:4  
[25] top-level scope  
@ ~/.julia/packages/ModelingToolkit/BsHty/src/ModelingToolkit.jl:128  
[26] include  
@ Base ./Base.jl:495 [inlined]  
[27] 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, UInt128}}, source::String)  
@ Base ./loading.jl:2216  
[28] top-level scope  
@ stdin:3  
in expression starting at /home/edward/.julia/packages/ModelingToolkit/BsHty/src/systems/abstractsystem.jl:1  
in expression starting at /home/edward/.julia/packages/ModelingToolkit/BsHty/src/ModelingToolkit.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile ModelingToolkit [961ee093-0014-501f-94e3-6117800e7a78] to “/home/edward/.julia/compiled/v1.10/ModelingToolkit/jl\_2Uzo9H”.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:35  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, keep\_loaded\_modules::Bool)  
@ Base ./loading.jl:2462  
[3] compilecache  
@ Base ./loading.jl:2334 [inlined]  
[4] (::Base.var"#968#969"{Base.PkgId})()  
@ Base ./loading.jl:1968  
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale\_age::Int64, wait::Bool})  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93  
[6] #mkpidlock#6  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]  
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale\_age::Int64})  
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111  
[8] #invokelatest#2  
@ Base ./essentials.jl:889 [inlined]  
[9] invokelatest  
@ Base ./essentials.jl:884 [inlined]  
[10] maybe\_cachefile\_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale\_age::Int64)  
@ Base ./loading.jl:2977  
[11] maybe\_cachefile\_lock  
@ Base ./loading.jl:2974 [inlined]  
[12] \_require(pkg::Base.PkgId, env::String)  
@ Base ./loading.jl:1964  
[13] \_\_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1806  
[14] #invoke\_in\_world#3  
@ Base ./essentials.jl:921 [inlined]  
[15] invoke\_in\_world  
@ Base ./essentials.jl:918 [inlined]  
[16] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1797  
[17] macro expansion  
@ Base ./loading.jl:1784 [inlined]  
[18] macro expansion  
@ Base ./lock.jl:267 [inlined]  
[19] \_\_require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1747  
[20] #invoke\_in\_world#3  
@ Base ./essentials.jl:921 [inlined]  
[21] invoke\_in\_world  
@ Base ./essentials.jl:918 [inlined]  
[22] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1740  
[23] include  
@ Base ./Base.jl:495 [inlined]  
[24] 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, UInt128}}, source::Nothing)  
@ Base ./loading.jl:2216  
[25] top-level scope  
@ stdin:3  
in expression starting at /home/ed

I would appreciate any guidance or suggestions on how to resolve these precompilation errors. Has anyone else experienced similar issues with NeuralPDE or its dependencies? Any help in troubleshooting this would be greatly appreciated.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Edylennyy\_Edy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/edylennyy_edy/32/206102_2.png) [@Edylennyy\_Edy](https://discourse.julialang.org/u/Edylennyy_Edy)\
**Post date:** [January 11, 2024, 6:37pm UTC](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623/2 "2024-01-11T18:37:59Z")

</div>

Solution: Older versions might be more compatible with certain packages or legacy code.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 12, 2024, 3:46am UTC](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623/3 "2024-01-12T03:46:07Z")

</div>

> [@Edylennyy\_Edy](#):
>
> 0 dependencies successfully precompiled in 56 seconds. 333 already precompiled.

You have very many packages installed in a single environment. This increases the likelihood of conflicting packages with distinct compatibilities.

If possible try to separate individual tasks into separate projects. For this task, try creating a new shared project

```julia
using Pkg
pkg"activate @neuralpde"
pkg"add NeuralPDE"

```

Next time you want to use NeuralPDE, do

```julia
using Pkg
pkg"activate @neuralpde"

```

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 19, 2024, 3:40am UTC](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623/4 "2024-01-19T03:40:32Z")

</div>

There are on-going updates to get this package working with latest dependency versions and Julia v1.10. You can track this in [build: compat bumps to latest versions by sathvikbhagavan · Pull Request #783 · SciML/NeuralPDE.jl · GitHub](https://github.com/SciML/NeuralPDE.jl/pull/783)
