Skip to main content

Requirements

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

Install via package manager

npm install wreq-js

Supported platforms

Prebuilt native binaries are provided for:
PlatformArchitecture
macOSIntel (x64)
macOSApple Silicon (arm64)
Linuxx64 (glibc)
Linuxx64 (musl)
Linuxarm64 (glibc)
Windowsx64

Building from source

If a prebuilt binary for your platform is unavailable, the package will attempt to build from source. Make sure you have the following installed:

Prerequisites

  1. Rust toolchain — Install via rustup:
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  2. Build essentials — C compiler and related tools:
    xcode-select --install
    

Build

After installing prerequisites, the package will automatically build when you run:
npm install wreq-js

Verify installation

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

If you see an error about missing binaries, ensure you’re using a supported platform or have the build prerequisites installed.
If you encounter permission issues, try:
sudo chown -R $(whoami) ~/.npm