Artifactory supports installing an npm package using the npm CLI. You can use npm install to install packages from default or scoped registries set in the .npmrc file. You can also install from any npm registry by adding the --registry flag to your npm install command. This flag overrides the settings in your .npmrc file.
To install an npm package:
Run the following command:
npm install <PACKAGE_NAME>
Where:
<PACKAGE_NAME>: The name of the package you want to install, including the@<SCOPE>/prefix for scoped packages
For example:
npm install colors
To install packages from a specific registry:
Run the following command:
npm install <PACKAGE_NAME> --registry [JFrogPlatformURL]/artifactory/api/npm/<REPO_NAME>/Where:
<PACKAGE_NAME>: The name of the package you want to install, including the@<SCOPE>/prefix for scoped packages[JFrogPlatformURL]: The URL of your JPD<REPO_NAME>: The name of the target repository
For example:
npm install colors --registry https://company.jfrog.io/artifactory/api/npm/npm-localNote
You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see Use Artifactory Set Me Up for Configuring Package Manager Clients.