Multiple packages with name <PACKAGE_NAME> exist #23
Answered
by
Konard
FreePhoenix888
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
Konard
Jun 11, 2023
Replies: 1 comment
-
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, type_id: packageTypeId }, // Delete the Package link
],
});
return deletedLinks;
}; CAUTION: This function does not move |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
FreePhoenix888
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: