选择命令行版本:
🌐 Synopsis
npm undeprecate <package-spec>
注意:此命令不支持工作区。
🌐 Note: This command is unaware of workspaces.
🌐 Description
此命令将更新软件包的 npm 注册表项,删除当前存在的任何弃用警告。
🌐 This command will update the npm registry entry for a package, removing any deprecation warnings that currently exist.
它的工作方式与 npm deprecate 相同,只不过这个命令是删除弃用警告,而不是添加它们。
🌐 It works in the same way as npm deprecate, except that this command removes deprecation warnings instead of adding them.
🌐 Configuration
registrynpm 注册表的基本 URL。
🌐 The base URL of the npm registry.
otp这是来自双因素认证器的一次性密码。在使用 npm access 发布或更改软件包权限时需要此密码。
🌐 This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with npm access.
如果未设置,并且注册表响应失败并询问一次性密码,npm 将在命令行上提示输入一次密码。
🌐 If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
dry-run表示你不希望 npm 做出任何更改,并且它只应该报告本来会做的事情。这个选项可以传递给任何修改本地安装的命令,例如 install、update、dedupe、uninstall,以及 pack 和 publish。
🌐 Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, install, update, dedupe, uninstall, as well as pack and publish.
注意:其他与网络相关的命令(例如 dist-tags、owner 等)不支持此项。
🌐 Note: This is NOT honored by other network related commands, eg dist-tags, owner, etc.
🌐 See Also