Franklin.jl not building on 1.7.1

Hi all,

I have previously used Franklin.jl (on 1.6.x) for my personal website, but I have not updated my site since upgrading to Julia 1.7.x. I tried to reinstall Franklin for 1.7.1 today, and get the following error during the build process:

julia> using Franklin
[ Info: Precompiling Franklin [713c75ef-9fc9-4b05-94a9-213340da978e]
ERROR: LoadError: UndefVarError: CommonMarkFlavor not defined
  [1] getproperty(x::Module, f::Symbol)
    @ Base ./Base.jl:35
  [2] top-level scope
    @ ~/.julia/packages/Franklin/fVmAP/src/eval/literate.jl:8
  [3] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [4] include(x::String)
    @ Franklin ~/.julia/packages/Franklin/fVmAP/src/Franklin.jl:1
  [5] top-level scope
    @ ~/.julia/packages/Franklin/fVmAP/src/Franklin.jl:197
  [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 /Users/liamdoherty/.julia/packages/Franklin/fVmAP/src/eval/literate.jl:8
in expression starting at /Users/liamdoherty/.julia/packages/Franklin/fVmAP/src/Franklin.jl:1
ERROR: Failed to precompile Franklin [713c75ef-9fc9-4b05-94a9-213340da978e] to /Users/liamdoherty/.julia/compiled/v1.7/Franklin/jl_ii7QRv.
  [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] eval
    @ ./boot.jl:373 [inlined]
  [8] eval
    @ ./Base.jl:68 [inlined]
  [9] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:157
 [10] (::VSCodeServer.var"#78#80"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:123
 [11] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:511
 [12] with_logger
    @ ./logging.jl:623 [inlined]
 [13] (::VSCodeServer.var"#77#79"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:124
 [14] #invokelatest#2
    @ ./essentials.jl:716 [inlined]
 [15] invokelatest(::Any)
    @ Base ./essentials.jl:714
 [16] macro expansion
    @ ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [17] (::VSCodeServer.var"#60#61")()
    @ VSCodeServer ./task.jl:423

My version info is

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.1.0)
  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.0 (ORCJIT, skylake)

I’ve looked around a bit, and haven’t seen any issues regarding CommonMarkFlavor. Does anyone have a fix for this? Thanks in advance!


[ Info: Precompiling Franklin [713c75ef-9fc9-4b05-94a9-213340da978e]

julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)        
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz
  WORD_SIZE: 64    
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

seems to work for me. I’m not sure if it makes sense to follow up potential problems with 1.7.1 given 1.8.0 is in beta.

One more remark: if this doesn’t work for you, you might have package dependency problems in your global environment? Try a local environment then.

Thanks for the response!

I just had the opportunity to get back to this now, and all I needed to do was activate my local environment and update the packages with Pkg.up(). Problem solved! :slight_smile: