使用Julia Genie时出错-如何修复Genie加载错误



PS:我试着在发布之前用谷歌搜索过,但找不到任何有用的东西

我正在使用:

  • Julia 1.4.1版
  • Genie v2.0.3

我是Julia语言的新手,刚刚完成了"julia简介;并启动";《精灵入门》;。在软件包安装过程中,我没有遇到任何问题/错误,但当尝试使用Genie时,它显示了以下错误:

using Genie.Router
[ Info: Precompiling Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]
ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: @invokelatest not defined
Stacktrace:
[1] #macroexpand#38 at ./expr.jl:108 [inlined]
[2] macroexpand at ./expr.jl:107 [inlined]
[3] docm(::LineNumberNode, ::Module, ::Any, ::Any, ::Bool) at ./docs/Docs.jl:523 (repeats 2 times)
[4] @doc(::LineNumberNode, ::Module, ::String, ::Vararg{Any,N} where N) at ./boot.jl:463
[5] include(::Module, ::String) at ./Base.jl:377
[6] include(::String) at /home/regis/.julia/packages/Genie/b0FAv/src/Genie.jl:4
[7] top-level scope at /home/regis/.julia/packages/Genie/b0FAv/src/Genie.jl:42
[8] include(::Module, ::String) at ./Base.jl:377
[9] top-level scope at none:2
[10] eval at ./boot.jl:331 [inlined]
[11] eval(::Expr) at ./client.jl:449
[12] top-level scope at ./none:3
in expression starting at /home/regis/.julia/packages/Genie/b0FAv/src/Commands.jl:26
in expression starting at /home/regis/.julia/packages/Genie/b0FAv/src/Commands.jl:11
in expression starting at /home/regis/.julia/packages/Genie/b0FAv/src/Commands.jl:11
in expression starting at /home/regis/.julia/packages/Genie/b0FAv/src/Genie.jl:42
ERROR: Failed to precompile Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e] to /home/regis/.julia/compiled/v1.4/Genie/8eazC_3Abxq.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922

如何修复此错误?

使用Julia 1.4.1有什么原因吗?如果你更新到Julia(1.6.2(的最新稳定版本,你的问题可能会自行解决

将Julia更新到1.6,它应该可以正常工作。也可以使用Genie v3.3.0或更高版本。Genie不断参与(具有新功能和错误修复(尝试使用最新标记版本

Project.toml中添加一个区段

[compat]
Genie = "3.3.0"

而在Pkg模式下]

Pkg(1.6)> up # use up to update the package

有关兼容性的详细信息:https://pkgdocs.julialang.org/v1/compatibility/

最新更新