Private NPM using Yarn

Install Saas UI Pro components from a private NPM registry.

Configuration is slightly different for each package manager, so it's important to follow the steps for the package manager you are using in your project.

Yarn#

This configuration is for Yarn 3, if you are still using Yarn 1.2 it's highly recommended to upgrade.

In the root of your project edit .yarnrc.yml and add the following lines.

npmScopes:
saas-ui:
npmRegistryServer: 'https://npm.saas-ui.dev'
npmRegistries:
//npm.saas-ui.dev:
npmAuthIdent: '${SAAS_UI_TOKEN:-}'
npmAlwaysAuth: true

To set it up on your dev machine add this to ~/.bash_profile or your CI configuration.

export SAAS_UI_TOKEN="GithubUsername:licenseKey"

The same configuration can be used for CI and deployments.

Run yarn add @saas-ui/pro to see if the configuration was succesful.

If you have issues getting this to work, try base64 encoding your auth token.

echo -n 'GithubUsername:licenseKey' | base64

Was this helpful?