# Documenter.jl expects my local project to be registered

**URL:** <https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437>\
**Category:** General Usage\
**Tags:** project, documenterjl\
**Created:** [July 10, 2023, 2:42pm UTC](https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437 "2023-07-10T14:42:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [July 10, 2023, 2:42pm UTC](https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437/1 "2023-07-10T14:42:17Z")

</div>

I have a local project, say `MyProject`.  
It has a `docs` directory with its own `Project.toml` file, which contains

```toml
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MyProject = "<UUID>"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

```

I `cd` to the `MyProject/docs` folder, `Pkg.activate` it, and then upon `Pkg.instantiate`ing it, I get the error

```plaintext
    Updating registry at `C:\Users\<USER>\.julia\registries\General.toml`
ERROR: expected package `MyPackage [<UUID>]` to be registered

```

I’ve gotten it to work on rare occasion, and afterwards it breaks itself.

The `Documenter.jl` documentation tells you to run locally with `julia make.jl` from the `docs` folder, but this doesn’t utilise the `docs/Project.toml` that other registered packages I’ve seen online use. I’ve had to add the dependent packages in the Julia 1.9 environment instead of the `MyProject/docs` environment. I’m quite confused.

Notes:

- `(MyProject) pkg> test` runs successfully.
- `docs/make.jl` has the needed `push!(LOAD_PATH, "../src/")`.
- The `julia make.jl` in Powershell (yes I’m using Windows) doesn’t seem to load my `PlotsExt.jl` package extension.

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [July 10, 2023, 2:45pm UTC](https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437/2 "2023-07-10T14:45:13Z")

</div>

I think this happens because you didn’t `pkg> dev` your local package in the `docs` environment.  
Try this in the Julia REPL from your project root

```julia
pkg> activate docs

pkg> rm MyProject

pkg> dev .

```

This tells the `docs` environment to look at the path `.` for your code instead of online. This information is not actually stored in the `docs/Project.toml` but in the `docs/Manifest.toml`, which is why it is important to commit `docs/Manifest.toml` even though you probably `gitignore` the main `Manifest.toml`.

> [@kapple](#):
>
> `docs/make.jl` has the needed `push!(LOAD_PATH, "../src/")`.

You shouldn’t need this afterwards

---

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [July 10, 2023, 2:48pm UTC](https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437/3 "2023-07-10T14:48:10Z")

</div>

Wow! Worked wonders, thank you!

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [July 10, 2023, 3:21pm UTC](https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437/4 "2023-07-10T15:21:06Z")

</div>

If you create your future packages with [GitHub - JuliaCI/PkgTemplates.jl: Create new Julia packages, the easy way](https://github.com/JuliaCI/PkgTemplates.jl), this will even be done automatically 🕶

---

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [July 11, 2023, 2:35am UTC](https://discourse.julialang.org/t/documenter-jl-expects-my-local-project-to-be-registered/101437/5 "2023-07-11T02:35:20Z")

</div>

Well, I’ve must’ve messed it up when I first used it.  
I’ve tried again from scratch, being more careful, and it works! Thank you.
