If you try to load a package using a cypress URL that points to a non-existent directory, the package loader thinks it sees an empty directory. If you already have that package loaded, the result is that all code from that package is deleted.
Both repository and package URLs should be checked for existence in the file system before the loader agrees to take any action on the load.
(I'm on the portability branch).