# Confusing about -e and CLI use (relates to package precompilation)

**URL:** https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526
**Category:** New to Julia
**Tags:** question, package
**Created:** [September 20, 2025, 1:20pm UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526 "2025-09-20T13:20:27Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dankelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dankelley/32/33539_2.png) [@dankelley](https://discourse.julialang.org/u/dankelley)
#### Post date: [September 20, 2025, 1:20pm UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526/1 "2025-09-20T13:20:27Z")

</div>

I’m trying to use the documenter package with a github action (for a crude package I’m trying to construct [GitHub - dankelley/OceanAnalysis.jl: Julia code for oceanographic analysis](https://github.com/dankelley/OceanAnalysis.jl)), and am seeing problems with building 3 packages.

At first I thought it related to Documenter, and posted a question in an issue there ([How to handle a GH action that raises LoadError on a package? · Issue #2770 · JuliaDocs/Documenter.jl · GitHub](https://github.com/JuliaDocs/Documenter.jl/issues/2770)) but then I realized that the problem occurs on my own machine, too.

The problem (as I understand it, somewhat naively) seems to be that I get different behaviours for CLI julia instructions versus instructions I type in a console. (The `instantiate` I did within `]` and in the base interactive level produced no output .)

I think the material I’ve pasted below illustrates the issue, although of course I’d be more than happy to provide other information. Maybe I should remove absolutely everything on my machine that relates to Julia and restart from scratch?

```julia-auto
➜ git/OceanAnalysis.jl git:(main) julia --project=. -e "using Pkg; Pkg.instantiate()" &> dan; grep LoadE dan
ERROR: LoadError: ArgumentError: Package MbedTLS_jll [c8ffd9c3-330d-5841-b78e-0817d7145fa1] is required but does not seem to be installed:
ERROR: LoadError: Failed to precompile LibGit2_jll [e37daf67-58a4-590a-8e99-b0245dd2ffc5] to "/Users/kelley/.julia/compiled/v1.11/LibGit2_jll/jl_E9kxcW".
ERROR: LoadError: Failed to precompile LibGit2 [76f85450-5226-5b5a-8eaa-529ad045b433] to "/Users/kelley/.julia/compiled/v1.11/LibGit2/jl_5Vlr2G".
ERROR: LoadError: ArgumentError: Package MbedTLS_jll [c8ffd9c3-330d-5841-b78e-0817d7145fa1] is required but does not seem to be installed:
ERROR: LoadError: Failed to precompile LibGit2_jll [e37daf67-58a4-590a-8e99-b0245dd2ffc5] to "/Users/kelley/.julia/compiled/v1.11/LibGit2_jll/jl_GlrTIF".
ERROR: LoadError: Failed to precompile LibGit2 [76f85450-5226-5b5a-8eaa-529ad045b433] to "/Users/kelley/.julia/compiled/v1.11/LibGit2/jl_16vOAv".
➜ git/OceanAnalysis.jl git:(main) ✗ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.11.7 (2025-09-08)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.11) pkg> instantiate

(@v1.11) pkg> ^C

julia> using Pkg; Pkg.instantiate()

```

---

<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: [September 21, 2025, 2:42am UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526/2 "2025-09-21T02:42:14Z")

</div>

This is my CI.yml: [FLORIDyn.jl/.github/workflows/CI.yml at main · ufechner7/FLORIDyn.jl · GitHub](https://github.com/ufechner7/FLORIDyn.jl/blob/main/.github/workflows/CI.yml)

What I noticed, you do not use:

```julia-auto
- uses: julia-actions/julia-buildpkg@v1

```

Did you try:

```julia-auto
      - uses: julia-actions/julia-buildpkg@v1
      - name: Build documentation
        run: |
          julia --project=docs/ -e '
            using Pkg
            Pkg.develop(PackageSpec(path=pwd()))
            Pkg.instantiate()'
          julia --project=docs/ docs/make.jl

```

?

For building the documentation locally I use: [FLORIDyn.jl/scripts/build\_docu.jl at main · ufechner7/FLORIDyn.jl · GitHub](https://github.com/ufechner7/FLORIDyn.jl/blob/main/scripts/build_docu.jl)

---

<div class="post-metadata">

### Author: ![dankelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dankelley/32/33539_2.png) [@dankelley](https://discourse.julialang.org/u/dankelley)
#### Post date: [September 21, 2025, 9:18am UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526/3 "2025-09-21T09:18:18Z")

</div>

Thanks. I tried that, but still no luck. The same errors persist in the “Action” report.

But it’s not just the remote github action that causes problems. I see the problem also locally.

If I type

```julia-auto
julia --project=. -e "using Pkg; Pkg.instantiate()"

```

at the unix CLI, I get over 300 lines of output, notably with `LoadError` messages (for `MbedTLS_jll`, `LibGit2_jll` and `LibGit2`).

However, by contrast, if I start a Julia console session (again, from the commandline – I don’t use vscode etc) and type

```julia-auto
using Pkg; Pkg.instantiate()

```

there is no output, other than another `julia> ` prompt, so it seems there is no problem with that. Also, if in that julia session I type

```julia-auto
] instantiate

```

there is no output, other than a return to a `pkg> ` prompt.

I think this is my core problem.

I’m sorry to be so dense. I’m still at the stage of not really knowing what `activate`, `instantiate`, `update` and several other things actually mean, or why I need to do steps like this both in my package and also within the `docs` subdirectory of that package. In other words, although I’m really enjoying Julia so far, I’m still a newbie.

---

<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: [September 21, 2025, 1:00pm UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526/4 "2025-09-21T13:00:40Z")

</div>

What I did:

- I cloned you repository
- I run:

```julia-auto
julia --project
using Pkg
Pkg.update()

```

That worked fine. Then I tried to build the documentation with:

```julia-auto
include("scripts/build_docu.jl")

```

This failed because two PNG files were missing, maps.png and asmr.png.

I was able to create these png files using your scripts.

Now, I can successfully build the documentation using the include command above.

It also works without REPL:

```julia-auto
ufechner@ufryzen:~/repos/OceanAnalysis.jl$ julia --project -e 'include("scripts/build_docu.jl")'
  Activating project at `~/.julia/environments/v1.11`
  Activating project at `~/repos/OceanAnalysis.jl`
  Activating project at `~/.julia/environments/v1.11`
  Activating project at `~/repos/OceanAnalysis.jl`
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: Automatic `version="0.1.0"` for inventory from ../Project.toml
┌ Warning: Documenter could not auto-detect the building environment. Skipping deployment.
└ @ Documenter ~/.julia/packages/Documenter/eoWm2/src/deployconfig.jl:93
✓ LiveServer listening on http://localhost:8000/ ...
  (use CTRL+C to shut down)
^C
⋮ shutting down LiveServer… ✓

```

Can you reproduce my results?

---

<div class="post-metadata">

### Author: ![dankelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dankelley/32/33539_2.png) [@dankelley](https://discourse.julialang.org/u/dankelley)
#### Post date: [September 21, 2025, 1:12pm UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526/5 "2025-09-21T13:12:32Z")

</div>

Many thanks!!! I fiddled around a bit and got things working. I ended up removing `~/.julia` and also the local `Manifest.toml` and `Project.toml` files and then adding things one by one. Then I added a few things to my `.github/workflows/documentation.yml` file so that it could pass the steps.

So now it works!

I really appreciate your advice.

Dan

---

<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: [September 21, 2025, 1:20pm UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526/6 "2025-09-21T13:20:11Z")

</div>

I also noticed that you have no “Project.toml” in the doc folder. Normally, you should. Normally, Documenter.jl should not be a direct dependency of your project, because it is only needed for building the documentation, and normal users of your package will not do that.

Instead, Documenter should either be a test dependency, or you add it to the project in the doc folder. My Project.toml in that folder looks like this: [FLORIDyn.jl/docs/Project.toml at main · ufechner7/FLORIDyn.jl · GitHub](https://github.com/ufechner7/FLORIDyn.jl/blob/main/docs/Project.toml)

Of course, yours probably should look a bit different, but you get the idea.
