# Plots.jl fails to pre-compile in GitHub deployment but it has (?)

**URL:** https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076
**Category:** New to Julia
**Tags:** question, documentation, documenter, github, plots
**Created:** [January 22, 2025, 12:41pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076 "2025-01-22T12:41:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![acroscarrillo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acroscarrillo/32/214810_2.png) [@acroscarrillo](https://discourse.julialang.org/u/acroscarrillo)
#### Post date: [January 22, 2025, 12:41pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/1 "2025-01-22T12:41:39Z")

</div>

Hi [it’s me again!](https://discourse.julialang.org/t/basic-documenter-jl-pages-open-a-local-folder/125016/3)

**Context:**  
I am trying to deploy a very minimal documentation on GitHub using `Documenter.jl`. I have managed to [deploy my toy documentation](https://acroscarrillo.github.io/minimal_working_documenter_example/dev/exp/) if I dont use any `Plots.jl` by just following [this YouTube tutorial](https://www.youtube.com/watch?v=ZDQ28X3mGSo) just fine. However, also following that tutorial, if I make a tutorial documentation through a `tutorial.jl` like file containing some `Plots.jl` usage the GitHub build fails to deploy.

**The precise error I get:**  
This is in GitHub’s “build and deploy” step  
(I have shorten the error for readability)

 ![Screenshot 2025-01-22 at 13.30.43](https://global.discourse-cdn.com/julialang/original/3X/6/9/6949deceebde5ef0a25fadb6f4e3a8dfc56f705d.png)

**I am puzzled because:**

1. It all works locally
2. It all works if I comment out the `Plots.jl` section.
3. **Above the error, inside GitHub’s “install docs dependencies” step, `Plots.jl` clearly manages to precompile!**  
 ![Screenshot 2025-01-22 at 13.32.39](https://global.discourse-cdn.com/julialang/original/3X/a/6/a6f93b39b6e1a9c48e8d22e0a6286815bdf172aa.png)

**What’s going on?**  
I clearly have `Plots.jl` in my enviroment…

* * *

* * *

I can attatch my repo and the full GitHub logs for further details although the set up is essentially that of [my previous question](https://discourse.julialang.org/t/basic-documenter-jl-pages-open-a-local-folder/125016/3)

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 22, 2025, 1:44pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/2 "2025-01-22T13:44:01Z")

</div>

Do you have a separate `Project.toml` in the root folder and in the `docs` folder?

If so you need to add `Plots` to both.

---

<div class="post-metadata">

### Author: ![acroscarrillo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acroscarrillo/32/214810_2.png) [@acroscarrillo](https://discourse.julialang.org/u/acroscarrillo)
#### Post date: [January 22, 2025, 2:01pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/3 "2025-01-22T14:01:39Z")

</div>

@ufechner7 I should have it in both, so this is my repo structure:

```julia
── Manifest.toml
── Project.toml 
── docs/
│── Manifest.toml
│── make.jl
│── Project.toml 
│── src/
│ │── index.md
│ │── exp.md # automatically generated
│ │── experiments/
│ │ │── exp.jl
── src/
│── QuantumGeometricComplexity  
│── test.jl

```

And the entire contents of the top `/Project.toml` are:

```julia
name = "QuantumGeometricComplexity"
uuid = "123e4567-e89b-12d3-a456-426614174000"
authors = ["Your Name <youremail@example.com>"]
version = "0.1.0"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[compat]
ColorSchemes = "3.27.1"
Documenter = "1.8.0"
Literate = "2.20.1"
Plots = "1.40.9"

```

and the entire contents of the `docs/Project.toml` are:

```julia
[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

```

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 22, 2025, 2:09pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/4 "2025-01-22T14:09:17Z")

</div>

Complete error log: [test · acroscarrillo/minimal\_working\_documenter\_example@64eab9f · GitHub](https://github.com/acroscarrillo/minimal_working_documenter_example/actions/runs/12907517771/job/35991283980)

```julia
 │ The following 3 direct dependencies failed to precompile:
│    
│ Plots 
│    
│ Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/home/runner/.julia/compiled/v1.11/Plots/jl_J64yZU".
│ ERROR: LoadError: ArgumentError: Package ColorSchemes [35d6a980-a343-548e-a6ea-1d62b119f2f4] is required but does not seem to be installed:
│ - Run `Pkg.instantiate()` to install all recorded dependencies.

```

Perhaps there is an error in [minimal\_working\_documenter\_example/.github/workflows/deploy.yaml at main · acroscarrillo/minimal\_working\_documenter\_example · GitHub](https://github.com/acroscarrillo/minimal_working_documenter_example/blob/main/.github/workflows/deploy.yaml)

Perhaps this line is needed?

```julia
   #run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'

```

---

<div class="post-metadata">

### Author: ![acroscarrillo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acroscarrillo/32/214810_2.png) [@acroscarrillo](https://discourse.julialang.org/u/acroscarrillo)
#### Post date: [January 22, 2025, 2:13pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/5 "2025-01-22T14:13:47Z")

</div>

I get this error:

 ![Screenshot 2025-01-22 at 15.21.25](https://global.discourse-cdn.com/julialang/original/3X/d/4/d4812ce580ecd2d748e1e5f93256033af62a6375.png)  
I guess this comes from the fact my Module QuantumGeometricComplexity is not a registered package but this wasnt an issue before.

Perhaps the comment “You just need to make sure that the package is a develop-dependency” on the `.yaml` file is relevant?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 22, 2025, 3:25pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/6 "2025-01-22T15:25:15Z")

</div>

I do not know how to do this correctly. In my own packages the following section in the CI.yml file works:

```yml
  docs:
    name: Documentation
    runs-on: ubuntu-latest
    timeout-minutes: 40
    steps:
      - uses: actions/checkout@v4
      - uses: julia-actions/setup-julia@v2
      - uses: julia-actions/cache@v2
      - uses: julia-actions/julia-buildpkg@v1
      - uses: julia-actions/julia-docdeploy@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
      - run: |
          julia --project=docs -e '
            using Documenter: DocMeta, doctest
            using KiteUtils
            DocMeta.setdocmeta!(KiteUtils, :DocTestSetup, :(using KiteUtils); recursive=true)
            doctest(KiteUtils)'

```

Of course you would have to replace `KiteUtils` with the name of your own package.

---

<div class="post-metadata">

### Author: ![acroscarrillo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acroscarrillo/32/214810_2.png) [@acroscarrillo](https://discourse.julialang.org/u/acroscarrillo)
#### Post date: [January 23, 2025, 5:43pm UTC](https://discourse.julialang.org/t/plots-jl-fails-to-pre-compile-in-github-deployment-but-it-has/125076/7 "2025-01-23T17:43:37Z")

</div>

> [@ufechner7](#):
>
> ```julia
> docs:
> name: Documentation
> runs-on: ubuntu-latest
> timeout-minutes: 40
> steps:
> - uses: actions/checkout@v4
> - uses: julia-actions/setup-julia@v2
> - uses: julia-actions/cache@v2
> - uses: julia-actions/julia-buildpkg@v1
> - uses: julia-actions/julia-docdeploy@v1
> env:
> GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
> DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
> - run: |
> julia --project=docs -e '
> using Documenter: DocMeta, doctest
> using KiteUtils
> DocMeta.setdocmeta!(KiteUtils, :DocTestSetup, :(using KiteUtils); recursive=true)
> doctest(KiteUtils)'
> 
> ```

Issue is that my module is not a package (yet) and it doesnt seem to be documented/structured the same way as yours ☹
