fix(mana-auth): declare missing nanoid dependency

mana-auth has been crash-looping in production with:

    error: Cannot find package 'nanoid' from
    '/app/src/services/encryption-vault/index.ts'

The encryption-vault service imports nanoid for audit row IDs (line 27,
used at line 547 in the audit log writer), but nanoid was never added
to services/mana-auth/package.json. The import was introduced in commit
e9915428c (phase 2 — server-side master key custody) and slipped past
because nanoid happens to exist transitively in the workspace via
postcss → nanoid@3.3.11. Local pnpm store lookups would resolve it just
fine; a strict isolated container build can't.

Fix:
- Add "nanoid": "^5.0.0" to services/mana-auth/package.json deps
- pnpm install pulled nanoid@5.1.7 into services/mana-auth/node_modules

Verified the import resolves locally:
    bun -e 'import { nanoid } from "nanoid"; console.log(nanoid())'
    → ok: 6TLuTWlenhC0KnSESn5Ex

The Mac Mini still needs to redeploy mana-auth (rebuild image with the
new lockfile, restart container) to pick this up — production is
currently 502ing on auth.mana.how.
This commit is contained in:
Till JS 2026-04-08 15:50:14 +02:00
parent f5678268ff
commit 0d1d3b9449
2 changed files with 13 additions and 2 deletions

View file

@ -18,6 +18,7 @@
"postgres": "^3.4.5",
"jose": "^6.1.2",
"bcryptjs": "^3.0.2",
"nanoid": "^5.0.0",
"zod": "^3.24.0"
},
"devDependencies": {