# Missing source file for local package

**URL:** <https://discourse.julialang.org/t/missing-source-file-for-local-package/67689>\
**Category:** New to Julia\
**Tags:** package, package-manager\
**Created:** [September 4, 2021, 11:49am UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689 "2021-09-04T11:49:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [September 4, 2021, 11:49am UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/1 "2021-09-04T11:49:22Z")

</div>

I have a module I am developing using Visual Studio Code on a Win 10 virtual machine. It is working fine. The source code is in a GitHub repository. I have cloned this repository to a different Win 10 virtual machine to the same relative location, namely `~/.julia/registries/PIPCore.jl`. The name of the package is “PIPCore”.

If I open this folder in VSC, and try to instantiate the environment, I get the following error:

```julia
> (PIPCore) pkg> instantiate
> 0 dependencies successfully precompiled in 4 seconds (124 already precompiled)
> 1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

```

When I run

> import Pkg; Pkg.precompile()

I get the following error:

```julia
julia> import Pkg; Pkg.precompile()
  0 dependencies successfully precompiled in 2 seconds (124 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

PIPCore [5f73200a-36c0-42cd-9607-31bc8d8705ce]

Error: Missing source file for PIPCore [5f73200a-36c0-42cd-9607-31bc8d8705ce

```

When I look at the `LOAD_PATH` and `DEPOT_PATH` constants, there is no obvious difference between the two VMs.  
`pwd()` in both cases points to the directory `~/.julia/registries/PIPCore.jl` with Project.toml file for this project. the source code is in `src` subdirectory.

I don’t know how to fix this, please help.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [September 4, 2021, 12:02pm UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/2 "2021-09-04T12:02:02Z")

</div>

Errrr… am I mistaken or do you expect the directory ~/.julia to have exactly the same contents on each virtual machine?  
By the way, Windows users would see this as C:\Users]your\_username.julia

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [September 4, 2021, 12:11pm UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/3 "2021-09-04T12:11:13Z")

</div>

Yes, I used ~ just to simplify the path, it is actually:

`C:\\Users\\kherbstadmin\\.julia\\registries\\PIPCore.jl`

and the content of these directories are identical on the two VMs. I don’t know whether it is relevant, but the VM without the problem runs Win 10, and the one with the problem runs Windows Server 2019. On the Win 10 machine Julia 1.6.2 is installed using juliaup, whereas on the second machine it is installed manually.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [September 4, 2021, 12:18pm UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/4 "2021-09-04T12:18:54Z")

</div>

Are you synchronising the contents of that directory between the two machines?

The difference in OS may be significant. There was an issue in permissions with Windows in the pre 1.0 era of Julia - I cannot remember the exact issue but you had to grant users some privileges.

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [September 4, 2021, 12:38pm UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/5 "2021-09-04T12:38:09Z")

</div>

I am not synchronising the contents directly, the original machine updated the source on GitHub, and I cloned the directory from GitHub to the second machine. The PIPCore.jl source file for the module is present in both cases and I have full permission to the directory. The operating system is an obvious difference, but I don’t see how it is related to this problem and what I can do to resolve the issue.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [September 4, 2021, 12:58pm UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/6 "2021-09-04T12:58:27Z")

</div>

I’m not sure where that path came from but it doesn’t make any sense as a package location. My guess is that you have it correctly installed elsewhere (in `~/.julia/packages` at the right location, which depends on the exact version) on the system that works and maybe also incidentally at `~/.julia/registries/PIPCore.jl`, probably because you cloned it there manually since the package manager doesn’t install packages there.

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [September 4, 2021, 3:40pm UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/7 "2021-09-04T15:40:18Z")

</div>

I am probably not explaining things properly. I am not trying to install the PIPCore package, but continue the development of the PIPCore.jl module that I started on the original VM.

What I have done now is to uninstall Julia, making sure I delete the original folder it was in completely, and re-install it, accepting the default installation location: `C:\Users\my_username\AppData\Local\Programs\Julia-1.6.2`

I then cloned the source code from GitHub to `E:\Source\` where it now resides in `E:\Source\PIPCore.jl`.

I launched Visual Studio Code and opened this folder. I started the Julia REPL.

```julia
julia> pwd()
"E:\\Source\\PIPCore.jl"

```

I then :

```julia
(PIPCore) pkg> instantiate
Precompiling project...
  ✓ Revise
  112 dependencies successfully precompiled in 74 seconds (12 already precompiled)
  1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

```

I restarted VSC as instructed (Restart julia to access the new version) , and started Julia REPL

```julia
julia> import Pkg; Pkg.precompile()
  0 dependencies successfully precompiled in 5 seconds (124 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

PIPCore [5f73200a-36c0-42cd-9607-31bc8d8705ce]

Error: Missing source file for PIPCore [5f73200a-36c0-42cd-9607-31bc8d8705ce
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
 [2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1265
 [3] precompile
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:921 [inlined]
 [4] #precompile#196
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:919 [inlined]
 [5] precompile()
   @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:919
 [6] top-level scope
   @ REPL[2]:1

```

Inside the `E:\Source\PIPCore.jl` directory is the src subdirectory with the PIPCore source code :

```julia
module PIPCore

# using statements

#export statement

#some code

include("staging.jl")

end

```

`staging.jl` is in the same `src` sub-directory.

Project.toml:

```julia
name = "PIPCore"
uuid = "5f73200a-36c0-42cd-9607-31bc8d8705ce"
authors = ["Kobus Herbst"]
version = "0.1.0"

[deps]
...

```

To the best of my knowledge these are the steps to follow to continue working on Julia source code, this procedure worked for me before, I can’t figure out why it doesn’t now.

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [September 5, 2021, 5:08am UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/8 "2021-09-05T05:08:56Z")

</div>

Try `]resolve` before `] instantiate`.

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [September 5, 2021, 6:07am UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/9 "2021-09-05T06:07:06Z")

</div>

I tried it:

```julia
(PIPCore) pkg> resolve
  No Changes to `E:\Source\PIPCore.jl\Project.toml`
  No Changes to `E:\Source\PIPCore.jl\Manifest.toml`

(PIPCore) pkg> instantiate
  0 dependencies successfully precompiled in 3 seconds (124 already precompiled)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

```

On the same machine I created a test package using PackageTemplates, no problem with using the test package. However, PIPCore was originally created with PackageTemplates and the code has the same basic layout.

---

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [September 5, 2021, 6:31am UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/10 "2021-09-05T06:31:09Z")

</div>

What is the main package file in `src` called?

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [September 5, 2021, 6:37am UTC](https://discourse.julialang.org/t/missing-source-file-for-local-package/67689/11 "2021-09-05T06:37:30Z")

</div>

Actually PIPCORE.jl, changed it to PIPCore.jl, problem solved.

Thank you so much, lesson learned that perhaps in Win 10 file name resolution is not case sensitive, but case sensitive in Windows Server.
