Skip to main content

Installation

LibXMTP is available for multiple platforms. Choose your platform to get started.

Node.js Installation

LibXMTP provides native Node.js bindings via NAPI-RS.

Requirements

  • Node.js 22 or later
  • npm, yarn, or pnpm

Install via npm

Install via yarn

Install via pnpm

Import in your project

The Node.js bindings include pre-built native modules for common platforms. No compilation required.

Verify Installation

After installing, verify your setup:

Troubleshooting

Node.js Issues

Error: Cannot find module ‘@xmtp/node-bindings’
  • Ensure you’re using Node.js 22 or later
  • Try clearing node_modules and reinstalling: rm -rf node_modules && npm install
Native module loading errors
  • The package includes pre-built binaries for common platforms
  • If your platform isn’t supported, you may need to build from source

iOS Issues

Binary framework download fails
  • Check your internet connection
  • Verify the GitHub release exists for your version
  • Try clearing Swift Package Manager cache: rm -rf ~/Library/Caches/org.swift.swiftpm
Build errors with “Cannot find ‘XMTPiOS’ in scope”
  • Clean build folder: Product → Clean Build Folder
  • Reset package caches: File → Packages → Reset Package Caches

Android Issues

Dependency resolution fails
  • Check that Maven Central is in your repositories list
  • Sync Gradle files: File → Sync Project with Gradle Files
Native library not found errors
  • The SDK includes .so files for all ABIs
  • Check that you haven’t excluded ABIs in your gradle configuration

Next Steps

Quickstart Guide

Build your first XMTP application

API Reference

Explore the complete API documentation