Skip to main content
Root serves patched npm packages under the @rootio/ scope. Use resolutions in package.json to route the original package to its Root-patched equivalent. Auth setup differs between Yarn 1 and Yarn 3+.

Yarn 1 (Classic)

Authentication

npm config set registry https://pkg.root.io/npm/ --location=project &&
npm config set //pkg.root.io/npm/:_authToken YOUR_ROOT_TOKEN --location=project

Update package.json

yarn remove axios
{
  "resolutions": {
    "axios": "npm:@rootio/axios@1.6.0"
  }
}

Install

yarn install

Yarn 3+ (Berry)

Authentication

yarn config set npmScopes.rootio.npmRegistryServer https://pkg.root.io/npm/ &&
yarn config set 'npmRegistries["//pkg.root.io/npm/"].npmAuthIdent' 'root:YOUR_ROOT_TOKEN'

Update package.json

yarn remove axios
{
  "resolutions": {
    "axios": "npm:@rootio/axios@1.6.0"
  }
}

Install

yarn install

Troubleshooting

IssueSolution
401 Unauthorized (Yarn 1)Verify your token: npm config get //pkg.root.io/npm/:_authToken
401 Unauthorized (Yarn 3)Check npmAuthIdent is set as root:YOUR_TOKEN (not base64)
Resolutions not applyingConfirm the package name in resolutions matches exactly