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

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

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 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.

1 Like

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

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

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

Leaving it for the future generations

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

1 Like