To install npm packages and add them as dependencies to your package.json
, run the following Yarn command:
yarn add <PACKAGE_NAME>
An example
yarn add lodash
Alternatively, you can run the following command:
yarn add lodash --registry https://artifactory.mycompany.com/artifactory/api/npm/<npm repository name>/