npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@choreruiz/capacitor-node-js

v1.0.2

Published

A full-fledged Node.js runtime for Capacitor apps. Fork of Capacitor-NodeJS by Rene Hampölz with Capacitor 8 + Xcode 26 fixes.

Readme

@choreruiz/capacitor-node-js

npm License: MIT

A full-fledged Node.js v18 runtime for Capacitor apps on iOS and Android.

This is a maintained fork of Capacitor-NodeJS by Rene Hampolz, with fixes for Capacitor 8, Xcode 26, and Swift Package Manager builds.

What's different from upstream

  • Capacitor 8.1 compatibility (removed deprecated handleOnResume/handleOnPause lifecycle methods)
  • Xcode 26 explicit module builds (proper import CapacitorNodejsBridge)
  • builtin_modules discovery in Capacitor's public/ subdirectory
  • SPM-first architecture (ios/Bridge/ + ios/Swift/ targets)
  • CocoaPods support maintained via updated podspec
  • Published to npm as @choreruiz/capacitor-node-js (no more manual .tgz installs)

Install

npm install @choreruiz/capacitor-node-js
npx cap sync

After cap sync, copy the bridge modules into your iOS project:

cp -R node_modules/@choreruiz/capacitor-node-js/ios/assets/builtin_modules ios/App/App/public/builtin_modules

Or add this to your package.json scripts so it runs automatically:

{
  "cap:sync": "cap sync && cp -R node_modules/@choreruiz/capacitor-node-js/ios/assets/builtin_modules ios/App/App/public/builtin_modules 2>/dev/null; true"
}

Configuration

In capacitor.config.ts:

plugins: {
  CapacitorNodeJS: {
    nodeDir: 'nodejs-project',     // directory inside public/ with your Node.js code
    startMode: 'auto',             // 'auto' or 'manual'
  },
}

Usage

Place your Node.js project in public/nodejs-project/ (or whatever nodeDir you configured). The engine starts automatically on app launch.

Send messages to Node.js

import { NodeJS } from '@choreruiz/capacitor-node-js';

await NodeJS.send({ eventName: 'myEvent', args: [{ hello: 'world' }] });

Receive messages from Node.js

import { NodeJS } from '@choreruiz/capacitor-node-js';

NodeJS.addListener('myResponse', (event) => {
  console.log('Got from Node:', event.args);
});

Node.js side (bridge module)

const { channel } = require('bridge');

channel.addListener('myEvent', (data) => {
  console.log('Got from Capacitor:', data);
  channel.send('myResponse', { result: 'ok' });
});

channel.send('ready');

Architecture

+----------------------------------+
|          Capacitor App           |
|  (WebView / Vue / React / etc)   |
+----------------------------------+
|     CapacitorNodeJS Plugin       |
|   (Swift / Kotlin bridge)        |
+----------------------------------+
|     NodeMobile.xcframework       |
|   Node.js v18.20.4 (JIT-less)    |
+----------------------------------+
  • iOS: Swift Package Manager with CapacitorNodejsBridge (C++17) and CapacitorNodejsSwift targets
  • Android: Gradle with CMake NDK build (arm64-v8a, armeabi-v7a, x86_64)
  • Bridge: IPC via JSON channels between Capacitor WebView and Node.js process

Binary size

The npm package includes pre-built Node.js binaries:

| Platform | Architecture | Size | |----------|-------------|------| | iOS | arm64 (device) | 53 MB | | iOS | arm64 + x86_64 (simulator) | 111 MB | | Android | arm64-v8a | 60 MB | | Android | armeabi-v7a | 109 MB | | Android | x86_64 | 39 MB |

Credits

Built on the excellent Capacitor-NodeJS by Rene Hampolz. Node.js mobile binaries from aspect-build/aspect-mobile.

License

MIT - see LICENSE