# ERROR: expected the file \`src/\*\` to exist for package \`\*\*\` at \`/tmp/\*\*\`

**URL:** <https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314>\
**Category:** New to Julia\
**Tags:** question, package, pkg\
**Created:** [March 16, 2021, 4:29pm UTC](https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314 "2021-03-16T16:29:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neo\_abs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neo_abs/32/16672_2.png) [@neo\_abs](https://discourse.julialang.org/u/neo_abs)\
**Post date:** [March 16, 2021, 4:29pm UTC](https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314/1 "2021-03-16T16:29:47Z")

</div>

I tried to add my own package from github repo and locally. I get the following error:

```julia
ERROR: expected the file `src/Package.jl` to exist for package `Package.jl` at `/tmp/jl_UTO0yG`

```

I tried following steps in [5. Creating Packages · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/creating-packages/) but I get this error for some reason. I’ll try my luck with `PkgTemplates.jl` but if someone can explain what is going on, I would be grateful.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 16, 2021, 4:32pm UTC](https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314/2 "2021-03-16T16:32:37Z")

</div>

You should be able to `pkg> rm Package` if you have accidentally deleted the files for the package.

---

<div class="post-metadata">

**Author:** ![neo\_abs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neo_abs/32/16672_2.png) [@neo\_abs](https://discourse.julialang.org/u/neo_abs)\
**Post date:** [March 16, 2021, 4:38pm UTC](https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314/3 "2021-03-16T16:38:46Z")

</div>

This directory `/tmp/jl_UTO0yG` changes every time. Your suggestion is to rebuild it again?

---

<div class="post-metadata">

**Author:** ![neo\_abs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neo_abs/32/16672_2.png) [@neo\_abs](https://discourse.julialang.org/u/neo_abs)\
**Post date:** [March 16, 2021, 5:18pm UTC](https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314/4 "2021-03-16T17:18:20Z")

</div>

Fixed it. /src was in subfolder:  
packagename/src

Leaving it for the future generations

---

<div class="post-metadata">

**Author:** ![joaquimg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaquimg/32/223_2.png) [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Post date:** [March 5, 2022, 1:54am UTC](https://discourse.julialang.org/t/error-expected-the-file-src-to-exist-for-package-at-tmp/57314/5 "2022-03-05T01:54:51Z")

</div>

Got the same error when calling `] test MyPackage `, but a different reason.

Accidentally left `name = MyPackage` on the top of the `Project.toml` inside the `test` subfolder
