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

expo-cloudflare-tunnel

v0.3.5

Published

Replace @expo/ngrok with cloudflared tunnel for Expo dev builds

Readme

expo-cloudflare-tunnel

Replace @expo/ngrok with cloudflared tunnel for Expo dev builds. Free, no account required.

Prerequisites

You must install cloudflared before using this package.

| Platform | Install | |----------|---------| | npm (any OS) | npm install -g cloudflared | | macOS | brew install cloudflared | | Linux (Debian/Ubuntu) | curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared && chmod +x /usr/local/bin/cloudflared | | Windows | winget install cloudflare.cloudflared or download from developers.cloudflare.com |

Verify installation:

cloudflared --version

Supported Expo SDK versions

| SDK | Status | |-----|--------| | 54 | Full support (timeout + connection props patched) | | 55 | Full support (timeout + connection props patched) | | 56 | Full support (timeout + connection props patched) | | 57-58 | Should work (timeout patched via regex, connection props patched) |

The @expo/ngrok replacement works with any Expo version. The AsyncNgrok.js patch (timeout + connection props) applies to SDK 54+.

Platform note: Tested on Windows and Linux. macOS is untested — please test and report back if you hit issues.

Install

pnpm add -D expo-cloudflare-tunnel
npx expo-tunnel setup

expo-tunnel setup adds pnpm overrides + tunnel script, then runs pnpm install. Done.

Manual setup (skip setup command)

Add to package.json:

"pnpm": {
  "onlyBuiltDependencies": ["expo-cloudflare-tunnel"],
  "overrides": {
    "@expo/ngrok": "link:./node_modules/expo-cloudflare-tunnel/src/stub"
  }
}

Then run pnpm install.

Usage

pnpm tunnel
# or
npx expo start --tunnel

If the tunnel script isn't in your package.json, add it:

"scripts": {
  "tunnel": "expo start --tunnel"
}

Commands

| Command | Description | |---|---| | setup | One-time pnpm config (adds overrides + build approval + tunnel script) | | start [port] | Start cloudflared tunnel manually (default port: 8081) | | kill | Stop running tunnel | | check | Verify cloudflared is installed | | patch [root] | Legacy — direct @expo/ngrok patching |

How it works

  • pnpm: overrides @expo/ngrok resolution to our src/stub/ — survives pnpm install
  • npm/yarn: postinstall writes node_modules/@expo/ngrok/ stub directly
  • AsyncNgrok.js patch: increases tunnel timeout to 30s (cloudflared is slower than ngrok) and strips ngrok-specific hostname/subdomain logic

Expo calls require('@expo/ngrok') — gets our cloudflared implementation, not ngrok.

Troubleshooting

"cloudflared is not installed" or ENOENT error

Install cloudflared (see Prerequisites above). This package does not bundle the cloudflared binary.

If cloudflared is installed but still not found, it's not in your PATH. Fix per platform:

Windows:

copy C:\Path\To\cloudflared.exe %APPDATA%\npm\cloudflared.exe

macOS:

# If installed via brew, it should already be in PATH
# If manually downloaded:
sudo cp cloudflared /usr/local/bin/cloudflared

Linux:

sudo cp cloudflared /usr/local/bin/cloudflared
sudo chmod +x /usr/local/bin/cloudflared

Verify it works:

cloudflared --version

Tunnel fails to connect

  • Ensure cloudflared is in your PATH
  • Try npx expo-tunnel start 8081 manually to see cloudflared output
  • Cloudflared quick tunnels require internet access

Expo version mismatch

If you see "AsyncNgrok.js not found", your Expo CLI version may not be in the 54-58 range. The ngrok replacement still works — only the timeout/props patches are skipped.