fix: run paperclip from cloned repo via pnpm dev:once

Merged
SH
7mo ago
+15-15

Summary

Run paperclip from ~/ghq/github.com/paperclipai/paperclip using pnpm dev:once instead of the global bun install.

Root cause

The global bun install -g paperclipai flattens pino@10 and pino-http@10.5 together, but pino-http@10.5 requires pino@9. The repo's lockfile correctly nests pino@9.14.0 inside pino-http, avoiding the crash.

Changes

  • ExecStart: pnpm dev:once (runs from the cloned repo)
  • WorkingDirectory: ~/ghq/github.com/paperclipai/paperclip
  • EnvironmentFile: loads both ~/dotfiles/.env (DATABASE_URL) and instance .env (secrets)
  • Env vars: HOST=0.0.0.0, PAPERCLIP_DEPLOYMENT_MODE=authenticated, PAPERCLIP_ALLOWED_HOSTNAMES

Tested

10/10 sequential requests returned 200 with pnpm dev:once — no crashes.


Summary by cubic

Run Paperclip using the local paperclipai binary and pin pino@9.14.0 to fix crashes from a pino/pino-http version mismatch. The systemd service now uses the local binary, loads env files, and sets required env vars.

  • Bug Fixes

    • ExecStart: ${HOME}/dotfiles/node_modules/.bin/paperclipai run --no-repair; WorkingDirectory=${HOME}/.paperclip.
    • Loads ~/dotfiles/.env and the instance .env; sets HOST=0.0.0.0, PAPERCLIP_DEPLOYMENT_MODE=authenticated, PAPERCLIP_ALLOWED_HOSTNAMES.
  • Dependencies

    • Override pino to 9.14.0 (remove pino-http override); lock now resolves pino-http@10.5.0.
    • bun.lock updated accordingly (introduces @pinojs/redact, replaces old fast-redact).