Artifactory supports installing an npm package using the Yarn client. The install workflow is the same for Yarn Classic and Yarn Modern.
To install an npm package with Yarn:
Run the following command:
yarn add <PACKAGE_NAME>
Where:
<PACKAGE_NAME>: The name of the package you want to install
For example:
yarn add lodash
Tip
You can also specify a certain version of the package by adding @<VERSION> after the package name, where <VERSION> is the version of the package you want to install. For example, yarn add lodash@4.17.21.
Note
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.