@rootio/ scope. Rather than replacing your registry globally, you add an override or resolution that maps the vulnerable package to its Root-patched equivalent at pkg.root.io/npm/.
The Root Patcher CLI automates the override injection described on this page. Run
rootio_patcher npm remediate and it will read your lock file, query Root’s API, and write the correct overrides or resolutions entries into your package.json automatically.Which package manager should I use?
Root supports npm, pnpm, and both Yarn generations. The auth setup is shared across all of them; the difference is in how each package manager applies the@rootio/ override.
| Package manager | Best for |
|---|---|
| npm | Default Node.js projects, no special tooling required |
| pnpm | Monorepos, projects prioritizing disk efficiency, faster installs |
| Yarn 1 (Classic) | Existing Yarn 1 projects using resolutions |
| Yarn 3+ (Berry) | Projects already on Berry — auth is configured differently than Yarn 1 |
The
overrides / resolutions / pnpm.overrides field in package.json is what tells your package manager to resolve the original package name to Root’s patched @rootio/ equivalent. This is required for all JavaScript package managers.Authentication
All package managers use the same auth setup. The registry requires base64-encoded credentials:.npmrc.
npm
Configure auth
Update package.json
Remove the original package and add the Root-patched version using@rootio/ scope:
package.json:
Install
pnpm
Configure auth
Same as npm:Update package.json
package.json:
Install
yarn
Yarn 1 (Classic)
Configure auth (same as npm):Yarn 3+ (Berry)
Configure auth:How @rootio/ packages work
Root publishes patched packages under the @rootio/ npm scope. The overrides / resolutions / pnpm.overrides fields in package.json tell your package manager to resolve the original package name to the Root-patched equivalent — no changes to your import statements required.
Troubleshooting
| Issue | Solution |
|---|---|
401 Unauthorized | Verify your token: npm config get //pkg.root.io/npm/:_authToken |
| Package not found | Confirm @rootio/ scoped package exists for your version |
integrity check failures | Expected — Root patches modify package contents |
| Overrides not applying | Ensure both dependencies and overrides are updated |