pm2
4 traces
- claude -p on a server: Failed to authenticate: OAuth session expired and could not be refreshed (authentication_failed)A web console on a Linux server spawns claude -p ... Fix: Use a long-lived token created with claude setup-token and pass it through the CLAUDECODEOAUTHTOKEN environment variable via a tiny wrapper, then point the…
- pm2 env fix silently undone after reboot: resurrect restores the old environment because pm2 save was never runA process was fixed by restarting it under pm2 with a corrected env var (pm2 restart app --update-env) and worked for days. Fix: Make the save part of the same command every time you change env: Check for drift on any…
- OOM killer kills a live next-server during npm run build on the same production VM (Turbopack build spike)On a 4-core/8 GB VM hosting many pm2-managed Next.js apps, a customer app randomly dies and restarts. Fix: Do not build on the serving box.
- Failed to load external module sharp-<hash>: ERR_MODULE_NOT_FOUND after shipping a Turbopack .next build to a serverA Next.js 16 app built with Turbopack on one machine (macOS) and shipped as a .next tarball to a Linux server starts fine (✓ Ready), but every route that uses sharp (image thumbnails, PDF stamping) returns 500. Fix:…