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

next-sea

v0.0.4

Published

Package a Next.js standalone build as a Node.js Single Executable Application

Downloads

90

Readme

next-sea

A Next.js deployment adapter that packages your application as a Node.js Single Executable Application (SEA).

next build
./server

Requirements

  • Node.js >= 26.0.0
  • Next.js >= 16.2.0

Installation

npm install --save-dev next-sea

Setup

Add the adapter to next.config.ts:

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  adapterPath: import.meta.resolve("next-sea"),
};

export default nextConfig;

Build and run:

next build
./server

The adapter enables output: "standalone" and creates the executable after the Next.js build completes. No extra packaging command is required.

Configuration

Use environment variables when building:

| Variable | Default | Description | | --- | --- | --- | | NEXT_SEA_OUTPUT | ./server | Executable output path | | NEXT_SEA_NODE | Current node binary | Target Node.js binary |

Cross-Compilation

Download the Node.js 26 binary for the target platform and pass it when building:

NEXT_SEA_NODE=./toolchains/node-v26-linux-x64/bin/node \
NEXT_SEA_OUTPUT=./dist/server-linux-x64 \
next build

The generated SEA disables V8 code cache and snapshots so that the build host and target platform may differ. Native addons still need to match the target OS, architecture, C library, and Node ABI. The target Node.js binary is copied into the SEA; it does not need to be executable on the build host.

How It Works

  1. modifyConfig() enables Next.js standalone output.
  2. onBuildComplete() schedules packaging after Next.js finishes writing the standalone tree.
  3. Before the build process exits, the adapter copies public/ and .next/static/ into the standalone tree.
  4. The adapter packs the complete standalone server, including traced node_modules.
  5. Node.js 26 embeds the compressed payload and a small bootstrap script into a SEA.
  6. On first run, the executable extracts the payload into a content-addressed cache and starts the unmodified standalone server.js.

The extracted application uses the normal Node.js filesystem module resolver, preserving dynamic require() behavior without rebundling or patching Next.js internals.

Cache

~/.cache/next-sea/<sha256>/              # Linux
~/Library/Caches/next-sea/<sha256>/      # macOS
%LOCALAPPDATA%\next-sea\<sha256>\        # Windows

Set NEXT_SEA_CACHE_DIR at runtime to override the cache location.

License

MIT