Work with Scoped Packages in Yarn

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

You can set up your project to use scoped packages by directing a scope name to your repository. Add the following line to your project’s .yarnrc to work with a scoped package. Replace @jfrog with the relevant scoped package name.

In this example, all Yarn download requests for @jfrog will be downloaded from Artifactory.

For example:

@jfrog:registry “https://artifactory.mycompany.com/artifactory/api/npm/<npm repository name>/”
Resolve npm Scoped Packages

To resolve npm scoped packages, run the following command.

yarn add @<scope_name>/package

For example:

yarn add @jfrog/project-example