Cannot publish library because of local unpublished crate

Hi everyone !

I have an issue with cargo publish. In my crate I have own local crate. And I got an error:

error: failed to prepare local package for uploading

Caused by:
  no matching package named `idewave_packet` found
  location searched: registry `crates-io`
  required by package `tentacli v4.0.0

Does this mean I should also publish my local crate ? Or is it possible to avoid this ?

You can't have local dependencies when publishing to You'd need to publish v0.1.0 (which your tentacli depends on when Cargo is unable to get the dependency from the specified path on your machine) your idewave_packet first. Read more about path dependencies here, especially the two notes at the end are relevant for you:

Note: Neither the git key nor the path key changes the meaning of the version key: the version key always implies that the package is available in a registry. version, git, and path keys are considered separate locations for resolving the dependency.

Note: does not allow packages to be published with dependencies on code published outside of itself (dev-dependencies are ignored). See the Multiple locations section for a fallback alternative for git and path dependencies.


Thank you !

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.