# Obscure error message when using Documenter plugin in PkgTemplates.jl

**URL:** <https://discourse.julialang.org/t/obscure-error-message-when-using-documenter-plugin-in-pkgtemplates-jl/97831>\
**Category:** General Usage\
**Tags:** documenter, pkgtemplates\
**Created:** [April 23, 2023, 11:01pm UTC](https://discourse.julialang.org/t/obscure-error-message-when-using-documenter-plugin-in-pkgtemplates-jl/97831 "2023-04-23T23:01:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmv/32/26323_2.png) [@mmv](https://discourse.julialang.org/u/mmv)\
**Post date:** [April 23, 2023, 11:01pm UTC](https://discourse.julialang.org/t/obscure-error-message-when-using-documenter-plugin-in-pkgtemplates-jl/97831/1 "2023-04-23T23:01:10Z")

</div>

Hi!

I am trying to initiate a second project by defining a template suitable for use with the package `PkgTemplates`. The template definition appears to work fine without the `Documenter` plugin, but as soon as I include it as shown here:

```julia
tmpl = Template(;
    user="Michel Verstraete",
	dir="~/Projects/MISR/MISR_RCCM",
    ...
    julia=v"1.8",
    plugins=[
        ...
        Documenter{GitHubActions}(;
            make_jl="~/Projects/MISR/MISR_RCCM/JMRCCM/docs/make.jl",
            index_md="~/Projects/MISR/MISR_RCCM/JMRCCM/docs/src/index.md",
            assets=String[],
            logo=Logo(),
            canonical_url=make_canonical(GitHubActions),
            devbranch=nothing,
            edit_link=:devbranch,
            makedocs_kwargs=Dict{Symbol,Any}(),
            ),
		...
        ],
	)

```

I get the error message

```julia
ERROR: TypeError: in Type{...} expression, expected UnionAll, got a value of type Module
Stacktrace:
 [1] top-level scope
   @ REPL[25]:1

```

even though this is pretty much verbatim what appears in the documentation at

[User Guide · PkgTemplates.jl](https://juliaci.github.io/PkgTemplates.jl/stable/user/) and  
[PkgTemplates.jl/user.md at master · JuliaCI/PkgTemplates.jl · GitHub](https://github.com/JuliaCI/PkgTemplates.jl/blob/master/docs/src/user.md)

I’ve tried to replace `GitHubActions` by `Nothing` on the two lines, and to add the `GitHubActions` plugin itself, but to no avail. Even the simplest plugin setting `Documenter{GitHubActions}(),` generates that same error message.

Comments and suggestions will be most welcome.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [April 23, 2023, 11:15pm UTC](https://discourse.julialang.org/t/obscure-error-message-when-using-documenter-plugin-in-pkgtemplates-jl/97831/2 "2023-04-23T23:15:05Z")

</div>

For what it’s worth, you don’t _need_ to use `Template`, just doing this usually works:

```julia
using PkgTemplates
generate()

```

The above should give some kind of interactive text user interface, so try using that.

---

<div class="post-metadata">

**Author:** ![mmv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmv/32/26323_2.png) [@mmv](https://discourse.julialang.org/u/mmv)\
**Post date:** [April 24, 2023, 8:59am UTC](https://discourse.julialang.org/t/obscure-error-message-when-using-documenter-plugin-in-pkgtemplates-jl/97831/3 "2023-04-24T08:59:20Z")

</div>

Hi @nsajko,

Thanks for your suggestion. I’ve tried to use the interactive approach before, but it is very picky and quits as soon as one makes the slightest mistake, forcing one to restart from scratch. This is very frustrating, in part because one often does not know what the questions or options are all about, what’s the most appropriate answer, or what’s the implication of the setting. I’d rather prepare a template definition first, containing only those options I do understand and need, if that can be made to work.

In any case, I’d like to know what’s wrong with the settings indicated earlier, because similarly answering the same entries in the interactive session would likely lead to the same error.
