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

# Installation

> Install wreq-js and get ready for development.

## Requirements

* **Node.js** v20.0.0 or higher
* One of the supported platforms (see below)

## Install via package manager

```bash npm theme={null}
npm install wreq-js
```

```bash yarn theme={null}
yarn add wreq-js
```

```bash pnpm theme={null}
pnpm add wreq-js
```

```bash bun theme={null}
bun add wreq-js
```

## Supported platforms

Configured native targets in `package.json` include:

| Platform | Architecture |
| - | - |
| macOS | Intel (x64) |
| macOS | Apple Silicon (arm64) |
| Linux | x64 (glibc) |
| Linux | x64 (musl) |
| Linux | arm64 (glibc) |
| Linux | arm64 (musl) |
| Windows | x64 |
| Windows | arm64 |
| Android | arm64 (Termux) |

## Building from source

> [!WARNING]
>
> If a prebuilt binary for your platform is unavailable, installation may require building from source. Make sure you have the following installed:

### Prerequisites

1. **Rust toolchain**: install via [rustup](https://rustup.rs/):
   ```bash theme={null}
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
   ```

2. **Build essentials**: C compiler and related tools:

   > [tab] macOS
   >
   > ```bash theme={null}
   > xcode-select --install
   > ```

   > [tab] Ubuntu/Debian
   >
   > ```bash theme={null}
   > sudo apt-get install build-essential
   > ```

   > [tab] Windows
   >
   > Install [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) with the "C++ build tools" workload.

### Build

After installing prerequisites, the package will automatically build when you run:

```bash theme={null}
npm install wreq-js
```

## Verify installation

```typescript theme={null}
import { fetch, getProfiles } from 'wreq-js';

// Check available browser profiles
console.log('Available profiles:', getProfiles());

// Make a test request
const response = await fetch('https://httpbin.org/get', {
  browser: 'chrome_142',
});
console.log('Status:', response.status);
```

## Troubleshooting

> [accordion] Binary not found error
>
> If you see an error about missing binaries, ensure you're using a supported platform or have the build prerequisites installed.

> [accordion] Permission errors on macOS
>
> If you encounter permission issues, try:
>
> ```bash theme={null}
> sudo chown -R $(whoami) ~/.npm
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.