> ## Documentation Index
> Fetch the complete documentation index at: https://docs.root.io/llms.txt
> Use this file to discover all available pages before exploring further.

# pnpm

> Configure pnpm to use Root Library Catalog for secure JavaScript packages.

Root serves patched npm packages under the `@rootio/` scope. Use `pnpm.overrides` in `package.json` to route the original package to its Root-patched equivalent.

## Authentication

```bash theme={null}
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

```bash theme={null}
pnpm remove axios
```

```json theme={null}
{
  "dependencies": {
    "axios": "npm:@rootio/axios@1.6.0"
  },
  "pnpm": {
    "overrides": {
      "axios": "npm:@rootio/axios@1.6.0"
    }
  }
}
```

## Install

```bash theme={null}
pnpm install
```

## Troubleshooting

| Issue                  | Solution                                                          |
| ---------------------- | ----------------------------------------------------------------- |
| `401 Unauthorized`     | Verify your token: `npm config get //pkg.root.io/npm/:_authToken` |
| Overrides not applying | Use `pnpm.overrides` (not top-level `overrides`) for pnpm         |
