# LoadError: ArgumentError: Package X does not have Y in its dependencies

**URL:** <https://discourse.julialang.org/t/loaderror-argumenterror-package-x-does-not-have-y-in-its-dependencies/117322>\
**Category:** General Usage\
**Tags:** package, development\
**Created:** [July 22, 2024, 5:08am UTC](https://discourse.julialang.org/t/loaderror-argumenterror-package-x-does-not-have-y-in-its-dependencies/117322 "2024-07-22T05:08:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jollywatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jollywatt/32/202198_2.png) [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Post date:** [July 22, 2024, 5:08am UTC](https://discourse.julialang.org/t/loaderror-argumenterror-package-x-does-not-have-y-in-its-dependencies/117322/1 "2024-07-22T05:08:08Z")

</div>

I have been using Julia for years and dread this error because I have never been able to reliably fix it.

I am developing packages `A` and `B`, where `A` uses `B` as a dependency.  
In Julia, in the main environment, `using A` errors with

```julia
ERROR: LoadError: ArgumentError: Package A does not have B in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have A checked out for development and have
  added B as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with A

```

…as is very familiar from so many other questions like this.

The problem is that `B` _is_ in `A`’s dependencies `Project.toml` file, and after trying every combination of `Pkg.resolve()`, `Pkg.instantiate()`, restarting Julia, and `using A` (doing any/all of these in both `A`’s environment and the main environment), I still get this error.

What am I missing?

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [July 22, 2024, 5:54am UTC](https://discourse.julialang.org/t/loaderror-argumenterror-package-x-does-not-have-y-in-its-dependencies/117322/2 "2024-07-22T05:54:06Z")

</div>

> [@Jollywatt](#):
>
> What am I missing?

For starters please post the `Project.toml`s of both `A` and `B` and show a full REPL session where you activate the environment, do a `]status` and then trigger the warning shown in the post.

---

<div class="post-metadata">

**Author:** ![Jollywatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jollywatt/32/202198_2.png) [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Post date:** [July 22, 2024, 7:44am UTC](https://discourse.julialang.org/t/loaderror-argumenterror-package-x-does-not-have-y-in-its-dependencies/117322/3 "2024-07-22T07:44:18Z")

</div>

To my great frustration, it’s working now. I’m not sure what I did now that I didn’t try before. Till next time!
