Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unpublish a package version not possible if it has dependencies with other packages #7875

Closed
2 tasks done
aryamohanan opened this issue Oct 23, 2024 · 2 comments
Closed
2 tasks done

Comments

@aryamohanan
Copy link

aryamohanan commented Oct 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Not able to unpublish a package version if it has dependencies with other packages.
I attempted to use npm unpublish package@version, but encountered the following error.

You can no longer unpublish this package.
npm ERR! Failed criteria:
npm ERR! has dependent packages in the registry

I would like to unpublish the specific version a package, that have dependents.

@aryamohanan aryamohanan added Bug thing that needs fixing Needs Triage needs review for next steps labels Oct 23, 2024
@milaninfy
Copy link
Contributor

@aryamohanan Please checkout this unpublish policy https://docs.npmjs.com/policies/unpublish

Generally if other package in registry depends on the package you are trying to unpublish then it will throw this error, as logically once you unpublish the package, the other dependent packages will break. This is a measure to prevent that.

Closing: this looks to be an support question with the registry which is outside the scope of this repo. For registry support please go to npmjs.com/support. If you believe this is a bug with the cli, please provide further clarifying details.

@milaninfy milaninfy removed Needs Triage needs review for next steps Bug thing that needs fixing labels Oct 23, 2024
@aryamohanan
Copy link
Author

@milaninfy I need to unpublish the dependent package as well. The dependent packages are also part of our monorepo and were published using Lerna. However, the versions were mistakenly updated by one version too high, so I need to revert all the packages in the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants