PkgTemplates. Errors after creating and deleting the package

I have done the following things:

  1. I created a test package using PkgTemplates, then
  2. I deleted it, and then
  3. I wanted to create another test package and I ran into an error.
    ERROR: expected package Test [caf985be]to exist at path/path-to-package/Test`

I also get the same error, when writing ] update or ] resolve. I tried different pkg commands.
I tried to remove folder General from .julia/registries.

This is the template I was using:

Template(; 
    user="pjgorski",
    dir="~/Test",
    authors="pjgorski",
    julia=v"1.6",
    plugins=[
        License(; name="MPL"),
        Git(; manifest=true, ssh=true),
        GitHubActions(; x86=true),
        Codecov(),
        Documenter{GitHubActions}(),
        Develop(),
    ],
)

Thanks for help!

It sounds like you installed your test package in the global Julia environment and because you deleted it, now it cannot be found.

To fix it, delete the test package from the global environment again ] rm MyPackage

In general, it is advised to install as few things as possible in the global environment. To test out packages, use ] activate —temp or activate a specific package inside a folder with ] activate .

1 Like