Renaming a published NPM module

前端 未结 7 1995
礼貌的吻别
礼貌的吻别 2020-12-23 11:14

Is there any way to rename an NPM module that has already been published? I want to change the name of my module to more accurately match the API it exposes but would not li

7条回答
  •  轮回少年
    2020-12-23 11:32

    There isn't any exposed way to do that. When I've encountered this in the past the approach I took was:

    npm deprecate %ProjectName%@"<=put-latest-version-here" "WARNING: This project has been renamed to %NewProjectName%. Install using %NewProjectName% instead."

    npm Deprecate instructions

提交回复
热议问题