Dependencies
Klippy is a Next.js (App Router) app that runs entirely in the browser with optional server‑side proxies for stock media and AI. This page lists runtime and dev dependencies, required system tooling, and common installation issues on macOS, Linux, and Windows.
1) Runtime matrix
- Node.js: 18–20 (recommended: 20 LTS). Node 21/22 may work but are not required.
- Browsers (latest): Chrome/Edge (best performance), Firefox, Safari (performance varies).
- OS: macOS, Linux, Windows 10/11 (native, Git Bash, or WSL2).
2) Core packages
UI / Framework
- next@15 — App Router, Edge routes
- react@19 / react-dom@19
- tailwindcss@3 — styling + theme tokens in
globals.css
- lucide-react — icons
State / Data
- @reduxjs/toolkit, react-redux — project/timeline state, history batching
- idb — local storage (IndexedDB)
- zod — schema validation
Media / Export
- @ffmpeg/core, @ffmpeg/ffmpeg, @ffmpeg/util — WASM export (MP4/WebM/GIF)
- mp4-muxer, webm-muxer — container helpers
- mediabunny — mobile‑first conversions (optional)
- react-moveable/moveable — element transform UI
- @remotion/* — preview player/utils for animations
AI / Analytics (optional)
- @tensorflow/*, MediaPipe models — background/pose features
- posthog-js — product analytics
- @sentry/nextjs — error monitoring
- @upstash/redis — rate limiting middleware
package.json
in the repo root.3) Scripts
npm run dev
— dev server (macOS/Linux, kills existing port)npm run dev:clean
— dev server without turbo (use for E2E)npm run dev:win
— dev server on Windows (PowerShell/CMD)npm run build
— production buildnpm start
— start production servernpm run lint
,npm test
,npm run test:e2e
4) System tooling (when needed)
The app itself does not require global FFmpeg or ImageMagick. Some dev dependencies (e.g., canvas
for tests) may need native build tools on Windows.
macOS / Linux
- Node via
nvm
- Optional:
lsof
(used bydev
script) - Optional (tests): build tools for native modules
Windows
- nvm‑windows to install Node 20
- Visual Studio Build Tools (Desktop C++ workload) — only if tests need
canvas
- Alternative: Run dev/tests in WSL2 Ubuntu for smoother native builds
5) External services
Keys live server‑side (no NEXT_PUBLIC_
prefix) and are accessed through Next API routes.
# Stock media PEXELS_API_KEY=... TENOR_API_KEY=... TENOR_CLIENT_KEY=clip-js MEME_API_KEY=... # Site & CORS (prod) NEXT_PUBLIC_SITE_URL=https://your-domain ALLOWED_ORIGINS=https://your-domain,https://www.your-domain
middleware.ts
(images/media/connect‑src allowlists).6) WASM & static assets
- FFmpeg core files are served from
/public/wasm
and must have MIMEapplication/wasm
. - Next config and
public/_headers
set correct content‑type; Service Worker pre‑caches in production. - CDN fallback can be enabled:
NEXT_PUBLIC_FFMPEG_ALLOW_CDN=true
.
7) Package inventory (auto‑generated)
Framework / UI (13)
- @radix-ui/react-dialog^1.1.14
- @radix-ui/react-icons^1.3.2
- @radix-ui/react-label^2.1.7
- @radix-ui/react-scroll-area^1.2.9
- @radix-ui/react-slot^1.2.3
- @radix-ui/react-switch^1.2.5
- class-variance-authority^0.7.1
- clsx^2.1.1
- lucide-react^0.503.0
- next^15.5.4
- next-themes^0.4.6
- react^19.1.1
- react-dom^19.1.1
Styling (5)
- autoprefixer10.4.14
- postcss8.4.31
- tailwind-merge^3.3.1
- tailwind-scrollbar^3.1.0
- tailwindcss3.3.3
State / Data (4)
- @reduxjs/toolkit^2.7.0
- idb^8.0.2
- react-redux^9.2.0
- zod^4.0.17
Media / Export (9)
- @ffmpeg/core^0.12.6
- @ffmpeg/ffmpeg^0.12.10
- @ffmpeg/util^0.12.1
- fix-webm-duration^1.0.6
- mediabunny^1.21.0
- moveable^0.53.0
- mp4-muxer^5.2.2
- react-moveable^0.56.0
- webm-muxer^5.1.4
Remotion (7)
- @remotion/animated-emoji^4.0.327
- @remotion/captions^4.0.327
- @remotion/fonts^4.0.327
- @remotion/google-fonts^4.0.327
- @remotion/media-parser^4.0.327
- @remotion/media-utils^4.0.327
- @remotion/player^4.0.327
AI / ML (7)
- @mediapipe/face_detection^0.4.1646425229
- @mediapipe/hands^0.4.1675469240
- @mediapipe/pose^0.5.1675469404
- @mediapipe/selfie_segmentation^0.1.1675465747
- @tensorflow/tfjs^4.22.0
- @tensorflow/tfjs-backend-webgl^4.22.0
- @tensorflow/tfjs-backend-webgpu^4.22.0
Analytics / Monitoring (3)
- @sentry/nextjs^10.3.0
- posthog-js^1.261.7
- posthog-node^5.8.2
Networking / Auth / Logging (4)
- @upstash/redis^1.35.3
- jose^6.1.0
- winston^3.17.0
- winston-transport^4.9.0
Images (1)
- sharp^0.34.4
TypeScript / Types (5)
- @types/node20.19.0
- @types/react^19.1.16
- @types/react-dom^19.1.9
- @types/uuid^10.0.0
- typescript5.1.6
Testing / E2E (10)
- @playwright/test^1.54.2
- @testing-library/dom^10.4.1
- @testing-library/jest-dom^6.6.4
- @testing-library/react^16.3.0
- @testing-library/user-event^14.6.1
- @vitest/coverage-v8^3.2.4
- @vitest/ui^3.2.4
- fake-indexeddb^6.2.2
- jsdom^26.1.0
- vitest^3.2.4
Lint / Build (7)
- @next/bundle-analyzer^15.5.2
- @typescript-eslint/eslint-plugin^8.0.0
- @typescript-eslint/parser^8.0.0
- @vitejs/plugin-react^4.3.4
- eslint^9.0.0
- eslint-config-next^15.5.4
- tsx^4.20.5
Other (19)
- @babel/generator^7.25.6
- @babel/parser^7.25.6
- @babel/traverse^7.25.6
- @babel/types^7.25.6
- @dodopayments/nextjs^0.2.0
- @eliastik/simple-sound-studio-lib^2.3.1
- @eslint/eslintrc^3.3.1
- @octokit/rest^22.0.0
- @tensorflow-models/body-pix^2.2.1
- @tensorflow-models/coco-ssd^2.2.3
- @uiw/react-md-editor^4.0.8
- @vercel/analytics^1.5.0
- canvas^3.1.2
- framer-motion^12.23.12
- react-colorful^5.6.1
- react-hot-toast^2.5.2
- react-icons^5.5.0
- react-zoom-pan-pinch^3.7.0
- uuid^11.1.0
package.json
in this repository (rendered on the server, grouped client‑side).8) Troubleshooting install/build
Node version mismatch
Use Node 18–20. Switch using nvm / nvm‑windows. Clear modules if needed: rm -rf node_modules package-lock.json && npm install
.
Windows: native build failed (canvas/node-gyp)
Install Visual Studio Build Tools (Desktop C++), Python 3, and retry. Or run tests in WSL2.
sharp/libvips errors during install
Ensure network can download prebuilt binaries. Try npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
or reinstall: npm rebuild sharp --verbose
.
Playwright browsers not installed
Run npx playwright install
. On Windows, use an elevated PowerShell or WSL2 if corporate policies block downloads.
FFmpeg WASM 404 or downloads as octet‑stream
Verify /wasm/ffmpeg-core.wasm
is served with application/wasm
and that next.config.js
rewrites are loaded.
403 Unauthorized origin for Tenor/Meme
Set NEXT_PUBLIC_SITE_URL
and ALLOWED_ORIGINS
to include your domain. For Electron/file:// set ALLOW_NULL_ORIGIN=true
.
Out of memory while building
Increase Node memory: macOS/Linux NODE_OPTIONS=--max-old-space-size=4096 npm run build
; Windows (PowerShell) $env:NODE_OPTIONS='--max-old-space-size=4096'; npm run build
.
9) FAQ
Do I need system FFmpeg?
No. Export uses @ffmpeg/ffmpeg
(WebAssembly) in the browser.
Can I run without keys?
Yes — local upload/edit/export works. Stock media search just won’t return results.