14 Use the Project's NPM Registry

Whenever a project is created, VB Studio provisions a private Node Package Manager (NPM) registry for the project.

You can use the built-in private NPM registry in VB Studio to do these things:

  • Download, publish, and audit private Javascript packages using Node.js/NPM command line tools.
  • Configure a build job in a Node.js project to download a JS package from and/or publish a JS package to the project's NPM registry, and audit the JavaScript packages using Node.js/NPM command line tools.
  • Browse and search for the available NPM package in the project's NPM registry.

When you install a package using the npm install command, NPM automatically attempts to install any dependencies required by the package. Your project's private VB Studio NPM registry will be checked first and, if a dependency isn't found there, the request is automatically forwarded to the default remote NPM registry. You just upload your project-specific package(s), and let NPM take care of resolving any dependencies at build time.

This feature is provided for customers who have developed their own Node.js packages that they want to use in their projects at their company but they don't want to publish to npmjs.org. This gives them a way to share those private Node.js packages with the rest of their company. The project's private NPM registry is a registry of your own internal packages.

Any package, scoped or unscoped, which has been published to the VB Studio NPM registry can be downloaded. You can configure the NPM client to download these packages or you could also use the NPM page's browse feature to download the packages. If a required package isn't found in the VB Studio NPM registry, it'll be downloaded from the external NPM registry. The package found in the remote registry won't be pulled down to the VB Studio NPM registry automatically, but nothing prevents you from doing so manually.

You can access the NPM page by clicking NPM VB Studio NPM Registry on the left navigator or by clicking the Project Registry link under the NPM category in the Repositories panel on the Project Home page.