Julia "Manifest.toml out of sync" / Pkg.instantiate in CI
Julia found that the manifest no longer matches the project, or that packages the manifest records are not installed. It needs Pkg.instantiate() to download and resolve the exact dependency set before code can load.
What this error means
A run fails with "ERROR: expected package X to be registered" or "The project dependencies or compat requirements have changed; run Pkg.resolve() or Pkg.update()", or a using fails because the manifest was never instantiated.
ERROR: `/home/runner/work/app/Project.toml` has dependencies but no
corresponding entries in the manifest, or the manifest is out of date.
Run `Pkg.resolve()` or `Pkg.instantiate()` to resolve.Common causes
The project was never instantiated in CI
The job activated the project but did not download its dependencies, so the manifest packages are absent.
Project.toml changed without re-resolving
A dependency or compat bound changed in Project.toml but Manifest.toml was not regenerated, so the two disagree.
How to fix it
Instantiate the project
- Activate the project with
--project=.. - Run
Pkg.instantiate()to install exactly what the manifest records. - Run your code in the same environment.
julia --project=. -e 'using Pkg; Pkg.instantiate()'Resolve and commit the manifest after a change
If Project.toml changed, resolve to regenerate the manifest and commit it so CI installs a consistent set.
julia --project=. -e 'using Pkg; Pkg.resolve()'How to prevent it
- Run
Pkg.instantiate()as a dedicated CI step. - Commit Manifest.toml so dependency versions are pinned.
- Cache
~/.juliaso packages are not re-downloaded each run.