Publish a package

npm.commands.publish([packages,] callback)

Publishes a package to the registry so that it can be installed by name. Possible values in the 'packages' array are:

If the package array is empty, npm will try to publish something in the current working directory.

This command could fails if one of the packages specified already exists in the registry. Overwrites when the "force" environment variable is set.

Last modified December 17, 2014           Found a typo? Send a pull request!

Getting Started

Using npm

npm Enterprise

CLI Commands

Configuring npm

Using npm programmatically

npm policy documents

View All On One Page