• NPM upload and publish custom components and use detailed process (included in Vue)

  • Follow the above steps to remove released versions of custom components or libraries, or to remove entire project Packages, after they have been published to NPM.


  • Delete the specified version or package:

    $ npm unpublish [<pkg>][@<version>] --force
    Copy the code

    After deleting the library package, you cannot upload the same library package to NPM again within 24 hours, you need to change the name of the package, or wait 24 hours before uploading.

    The following are some usage scenarios (the display list will be delayed after the command is executed successfully, and the deletion result can be seen after refreshing later) :

    • $NPM unpublish [email protected] --force

      Directly force to delete the specified version of the specified package, without the CD into the package folder, can be executed anywhere.

    • $ npm unpublish dzmtest --force

      Directly force to delete the specified package, without CD into the package folder, can be executed anywhere.

    • $ npm unpublish --force

      CD is required to enter the package folder before running this command.

      It does not delete the entire library package directly, only the versions configured in the current package.json project.

      Json to delete the entire package, you need to manually configure all released versions of the package to package.json. Run this command for each version to remove the package until all version numbers are empty.


  • Deprecate a specified version or package:

    $NPM deprecate < PKG >[@<version>] <message> // e.g. NPM dzmtest 'deprecate' deprecate [email protected] 'deprecate'Copy the code

    Discarded packages do not affect their use except that they will have a warning when installed.