2
votes

I am working in Julia and I'm trying to use Documenter.jl to create a documentation page for Examples.jl and I keep getting this error when I try to run my make.jl file:

ERROR: LoadError: UndefVarError: type not defined

Here is my code for the make.jl file:

using Documenter
using Examples

makedocs(
    sitename = "Examples.jl",
    pages = Any[
        "About" => "index.md",
        "Main" => "main.md",
        "Graphs" => "graphs.md",
        "Utilities" => "utilities.md",
        "Tutorial" => "tutorial.md"
    ]
)

Any ideas how to fix this error? Thanks

1
You're using a very old sample code. The problem isn't in the documentation generation, it's in your Examples module. You're probably using pre-1.0 syntax in that. Instead of type, now use mutable struct.mbauman

1 Answers

3
votes

As @Matt B. pointed out, type is no longer a valid keyword. In Julia 0.x you used to define types as:

type foo
    bar
end

Now we use struct or mutable struct instead. e.g.

struct foo
    bar
end

Go through your code and see if you see type anywhere.