# Wrong dev & instantiate order in PkgTemplates and Documenter?

**URL:** <https://discourse.julialang.org/t/wrong-dev-instantiate-order-in-pkgtemplates-and-documenter/54062>\
**Category:** General Usage\
**Tags:** documenter, pkg, pkgtemplates\
**Created:** [January 27, 2021, 3:07pm UTC](https://discourse.julialang.org/t/wrong-dev-instantiate-order-in-pkgtemplates-and-documenter/54062 "2021-01-27T15:07:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [January 27, 2021, 3:07pm UTC](https://discourse.julialang.org/t/wrong-dev-instantiate-order-in-pkgtemplates-and-documenter/54062/1 "2021-01-27T15:07:09Z")

</div>

[Documenter](https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#Travis-CI) and [PkgTemplates](https://github.com/invenia/PkgTemplates.jl/blob/9eea9eb8404da6e337fd13536999db2a6a7fbc80/templates/github/workflows/CI.yml#L75) use the following to prepare a docs job:

```julia
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'

```

Could it be that this order is wrong? I have a case where it fails with the following error:

```julia
ERROR: expected package `Documenter [e30172f5]` to exist at path `/home/runner/.julia/packages/Documenter/Otri3`

```

This happens when GitHub CI builds a project that depends on a custom version of Documenter (using `pkg> add https://github.com/knuesel/Documenter.jl#fix-envvar-checks` and pushing the resulting Manifest to GitHub). The goal of the whole thing is to test my Documenter branch, where I changed the code that handles GitHub actions.

The full build log can be seen [here](https://github.com/knuesel/TestPkg.jl/runs/1777246677)

However it [works](https://github.com/knuesel/TestPkg.jl/runs/1777624720) if I run `instantiate` before `develop`. Any reason we should not always do that?
