17.1. Introduction

The command line tool npm is a package management solution for Javascript-based development. It is used to create and use node packaged modules and is built into the popular Javascript platform Node.js, which is mostly used for server-side application development.

The npmjs website, available at https://www.npmjs.org, provides search and other convenience features to access the public registry at https://registry.npmjs.org/. It is the default package registry, from which components can be retrieved. It contains a large number of open source packages for Node.js based server-side application development, build tools like bower or grunt and many other packages for a variety of use cases.

Nexus Repository Manager and Nexus Repository Manager OSS support the npm registry format for proxy repositories. This allows you to take advantage of the packages in the npm registry and other public registries without incurring repeated downloads of packages, since the will be proxied.

In addition, Nexus Repository Manager and Nexus Repository Manager OSS support running your own private registry - also known as a hosted repository using the npm format. You can share internally developed, proprietary packages within your organization via these private registries allowing you to collaborate efficiently across development teams with a central package exchange and storage location.

[Note]

Users can enable Repository Health Check on a repository using the npm format to retrieve all metadata from components in the repository, such as security and license. See Chapter 12, Repository Health Check for details.

To simplify configuration Nexus Repository Manager and Nexus Repository Manager OSS support aggregation of npm registries. This allows you to expose all the external package from the npm registry and other public registries as well as the private registries as one registry, which greatly simplifies client configuration.

To share a package or tool with npm, you create a npm package and store it in the repository manager-based npm registry. Similarly, you can use packages others have created and made available in their NPM repositories by proxying them or downloading the packages and installing them in your own private registry for third party packages.

[Important]

npm support is a feature of version 2.10 and higher and is available in Nexus Repository Manager and Nexus Repository Manager OSS and requires npm version 1.4 and above.