ERROR: LoadError: UndefVarError: type not defined

Viewed 1265

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 Answers

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.

Related