# Package error Base does not have xxx in its dependencies

**URL:** <https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255>\
**Category:** New to Julia\
**Created:** [April 29, 2021, 2:53pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255 "2021-04-29T14:53:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![spatJul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spatjul/32/21378_2.png) [@spatJul](https://discourse.julialang.org/u/spatJul)\
**Post date:** [April 29, 2021, 2:53pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/1 "2021-04-29T14:53:52Z")

</div>

Trying to create Package get error

If you have Base checked out for development and have  
│ added xxx 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 Base  
└ Loading xxx into Base from project dependency, future warnings for Base are suppressed.

How to resolve this  
Pkg.resolve() didnt help

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 29, 2021, 3:30pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/2 "2021-04-29T15:30:38Z")

</div>

This is a very strange error. For other packages it often means that you have added a new package dependency to a package that you have `develop`ed (because it is yours and you are developing it, or because you are making a patch for that package), and now a package that makes use of your `dev`ed package is lost because the dependencies of the package changed within the same version.

In your case, how do you ended up the `Base` library checked out for development? Are you contributing to Julia?

---

<div class="post-metadata">

**Author:** ![spatJul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spatjul/32/21378_2.png) [@spatJul](https://discourse.julialang.org/u/spatJul)\
**Post date:** [April 29, 2021, 3:41pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/3 "2021-04-29T15:41:31Z")

</div>

No not contributing to Julia  
Was trying to create Package using PackageCompiler which was giving error so had tried out update; precompile and that’s when the error occured

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 29, 2021, 3:55pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/4 "2021-04-29T15:55:35Z")

</div>

The utility of PackageCompiler is not for creating a package (at least to my knowledge), but to compile the dependencies of a script so you either: (i) get a binary, or (ii) you can use the REPL to execute workflows similar to the script with less startup time. Can you tell us more about what are you trying to achieve?

---

<div class="post-metadata">

**Author:** ![spatJul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spatjul/32/21378_2.png) [@spatJul](https://discourse.julialang.org/u/spatJul)\
**Post date:** [April 29, 2021, 4:33pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/5 "2021-04-29T16:33:42Z")

</div>

Was trying to create exe.  
Used create\_app(“.”, “./dummy”)  
and that shows some dependencies error  
and hence tried precompile after reading in forums and got this error

The error on create app was as follows  
Stacktrace:  
[1] uv\_error at .\libuv.jl:97 [inlined]  
[2] open(::String, ::UInt16, ::UInt64) at .\filesystem.jl:87  
[3] sendfile(::String, ::String) at .\file.jl:940  
[4] cptree(::String, ::String; force::Bool, follow\_symlinks::Bool) at .\file.jl:327  
[5] cptree(::String, ::String; force::Bool, follow\_symlinks::Bool) at .\file.jl:324 (repeats 11 times)  
[6] cp(::String, ::String; force::Bool, follow\_symlinks::Bool) at .\file.jl:349  
[7] cp at .\file.jl:345 [inlined]  
[8] bundle\_artifacts(::Pkg.Types.Context, ::String) at …\src\PackageCompiler.jl:784  
[9] create\_app(::String, ::String; app\_name::Nothing, precompile\_execution\_file::Array{String,1}, precompile\_statements\_file::Array{String,1}, incremental::Bool, filter\_stdlibs::Bool, audit::Bool, force::Bool, c\_driver\_program::String, cpu\_target::String) at …\src\PackageCompiler.jl:656  
[10] top-level scope at REPL[79]:1

with couple of warnings as  
xxx has a build script, this might indicate that it is not relocatable  
xxx has a dependency on Requires.jl, code in `@require` will not be run

but that information didnt help much in knowing where exactly the error is occuring in creating package

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 30, 2021, 1:41pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/6 "2021-04-30T13:41:04Z")

</div>

> [@spatJul](#):
>
> xxx has a dependency on Requires.jl, code in `@require` will not be run

This may be a problem in itself, but seems unrelated to the problem in the stacktrace.

The stacktrace seem to show an error in the copying of the files to create the bundle. I am not sure this is related with the message in your original post, about the Base dependencies, and that message was a warning not an error so it may be a red herring.

---

<div class="post-metadata">

**Author:** ![spatJul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spatjul/32/21378_2.png) [@spatJul](https://discourse.julialang.org/u/spatJul)\
**Post date:** [April 30, 2021, 2:00pm UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/7 "2021-04-30T14:00:52Z")

</div>

Not sure, why the create\_app gives error in creating bundle, create\_app error shows the error  
Trying to create .exe out of the julia files

---

<div class="post-metadata">

**Author:** ![fatteneder](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fatteneder/32/33991_2.png) [@fatteneder](https://discourse.julialang.org/u/fatteneder)\
**Post date:** [October 19, 2022, 10:08am UTC](https://discourse.julialang.org/t/package-error-base-does-not-have-xxx-in-its-dependencies/60255/8 "2022-10-19T10:08:48Z")

</div>

Just encountered the same problem when I tried to generate a pkg from a bunch of scripts I had lying around.  
What I did was to copy all scripts into a `src/` folder, added a pkg file `src/MyPkg.jl` with all the includes, as well as a `Project.toml` file with all the dependencies (including `name, uuid, authors, version`).  
Starting with `julia --project` and running `using MyPkg` gave me the above error.

It took me a while to realize the problem: I had forgotten to wrap everything inside `src/MyPkg.jl` into a `module`, e.g. it should look like

```julia
module MyPkg

# includes go here

end # module

```

Restarting and `using MyPkg` then worked (maybe do a `resolve`/`instantiate` before).

Moral of the story:  
Although, I thought generating the pkg structure by hand isn’t so difficult, it took me a few minutes to get it right. I guess this just proves that one should always use `Pkg.generate()` when making a fresh package.
