npm_deprecate
Deprecate an npm package or specific versions with a custom warning message shown at install. Uses the HTTP API with NPM_TOKEN to avoid CLI auth friction and 422 errors.
Instructions
Deprecate a package or specific versions. Shows a warning message on install. Uses the HTTP API with NPM_TOKEN, bypassing the CLI auth friction that causes 422 errors on accounts with 2FA. Registry hard limit: deprecation messages must be <= 1024 characters. If the registry 422s, first verify the semver range matches at least one published version (npm_versions) — range/version mismatches are the most common cause, not message format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Package name (e.g. '@yawlabs/spend') | |
| message | Yes | Deprecation message. Use npm_undeprecate to clear. | |
| versionRange | No | Semver range. Omit to deprecate ALL versions. Example: '<1.0.0' or '0.3.x'. Standard semver applies — bare integers are x-ranges (e.g. '0' means '0.x.x', not exact version 0). For a single version use '=1.2.3'. |