Skip to content

Multiple packages with name <PACKAGE_NAME> exist #23

Answered by Konard
FreePhoenix888 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, at the moment, multiple versions of packages cannot work stably. So just delete all older versions. Be careful to also delete PackageVersion links for old packages until deep-foundation/npm-packager#47 is done. To do it in code:

const deletePackage = async (packageId) => {
  const packageTypeId = await deep.id('@deep-foundation/core', 'Package');
  const packageVersionTypeId = await deep.id('@deep-foundation/core', 'PackageVersion');

  // Delete the Package link and the PackageVersion link in a single deep.delete call
  const deletedLinks = await deep.delete({
    _or: [
      { to: { id: packageId }, type_id: packageVersionTypeId }, // Delete PackageVersion links
      { id: packageId

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FreePhoenix888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants