Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:0xsline OpenChatCut Node js

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Runtime
Last Updated 2026-10-22 14:00 GMT

Overview

Node.js >= 24 < 25 runtime environment required by the OpenChatCut server, CLI, and desktop backend.

Description

This environment provides the Node.js 24.x runtime that powers the Vite dev server, the embedded Electron HTTP server, and the CLI tool (`occ`). All server plugins, media processing pipelines, and agent runtime code execute within this Node.js context. The project enforces the version constraint via the `engines` field in `package.json` and uses ESM (`"type": "module"`) throughout.

Usage

Use this environment for any server-side or CLI operation: starting the dev server, running the `occ` CLI, executing server plugins, media import, rendering orchestration, and agent session management. It is the mandatory prerequisite for nearly every Implementation in the repository.

System Requirements

Category Requirement Notes
OS macOS, Windows, Linux Cross-platform; Linux prefers angle-egl GL backend
Hardware Any modern CPU 2+ cores recommended for render concurrency
Disk 1GB+ SSD For node_modules, media cache, SQLite store

Dependencies

System Packages

  • Node.js >= 24.0.0 < 25.0.0
  • `ffmpeg` (via `ffmpeg-static` or system PATH)
  • `ffprobe` (via `@ffprobe-installer/ffprobe` or system PATH)

npm Packages (runtime)

  • `vite` >= 8.3.5 (dev server / build)
  • `@remotion/renderer` 4.0.537 (server-side rendering)
  • `@modelcontextprotocol/sdk` >= 1.32.1 (MCP agent)
  • `ai` >= 7.0.148 (Vercel AI SDK)
  • `electron` >= 43.8.3 (desktop only)
  • `sqlite-vec` >= 0.1.1 (vector search)
  • `onnxruntime-node` 1.22.0-rev (native inference)
  • `ffmpeg-static` >= 5.3.0
  • `@ffprobe-installer/ffprobe` >= 2.1.2

Credentials

The following environment variables may be set in `.env.local` or via the settings UI:

  • `OPENCHATCUT_FFMPEG` — Override FFmpeg binary path
  • `OPENCHATCUT_FFPROBE` — Override FFprobe binary path
  • `OPENCHATCUT_WHISPER_CLI` — Override whisper.cpp CLI path
  • `OPENCHATCUT_H264_ENCODER` — Force a specific H.264 encoder
  • `OPENCHATCUT_DISABLE_HARDWARE_ENCODING` — Disable HW encoding
  • `OPENCHATCUT_RENDER_CONCURRENCY` — Override render concurrency
  • `OPENCHATCUT_VAAPI_DEVICE` — Override VAAPI render device
  • `CC_RENDER_GL` — Override renderer GL backend
  • `CC_BROWSER_EXECUTABLE` — Override Chromium binary path
  • `CC_REMOTION_BINARIES_DIR` — Override Remotion binaries directory
  • `CC_REMOTION_HARDWARE_BINARIES_DIR` — Override HW render binaries dir

Quick Install

# Install Node.js 24 (example using nvm)
nvm install 24
nvm use 24

# Install all dependencies
npm install

# Sync native binaries (mediapipe, whisper-cli)
npm run sync:mediapipe && npm run sync:whisper-cli

Code Evidence

Node.js version constraint from `package.json:14-16`:

"engines": {
  "node": ">=24 <25"
}

ESM module system from `package.json:8`:

"type": "module"

Binary resolution with environment overrides from `server/media-binaries.ts:33-38`:

export function ffmpegBin(): string {
  return process.env.OPENCHATCUT_FFMPEG
    ?? process.env.FFMPEG_PATH
    ?? (ffmpegStatic ? unpackedPath(ffmpegStatic) : null)
    ?? 'ffmpeg';
}

Common Errors

Error Message Cause Solution
`Unsupported engine` Node.js version outside 24.x range Install Node.js 24 using `nvm install 24`
`Cannot find module 'node:sqlite'` Node.js < 22 (sqlite module added in 22, stable in 24) Upgrade to Node.js >= 24
`Promise.withResolvers is not a function` Node.js < 22 Upgrade to Node.js >= 24
`whisper-cli is unavailable` whisper.cpp binary not synced Run `npm run sync:whisper-cli`

Compatibility Notes

  • Linux: Renderer GL backend defaults to `angle-egl` (works without X11). Set `CC_RENDER_GL=swangle` for software rendering on headless machines.
  • Windows: whisper-cli requires `.exe` suffix; FFmpeg static build swapped in for hardware encoding.
  • macOS: VideoToolbox H.264 encoder preferred; whisper.cpp uses Metal by default.
  • Packaged desktop (asar): Native binaries are unpacked from `app.asar` via `unpackedPath()` because `spawn` cannot execute from inside an asar archive.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment