devperf/backend/package.json
zyc ad66228edc
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m31s
fix: bcrypt 替换为 bcryptjs 修复 pod CrashLoopBackOff
oven/bun:1 镜像最近升到 bun 1.3.12,bcrypt 这个 native 模块的
prebuilt napi-v3/.node 二进制没装上,新 pod 启动时直接抛
"Cannot find module 'bcrypt_lib.node'" 死循环重启,旧 pod 一直没
被替换,env 变量、AI 同步代码都进不了线上。

bcryptjs 是纯 JS 实现,API 和哈希格式 (\$2a\$/\$2b\$) 与 bcrypt
完全兼容,可以直接读已有的密码 hash,避免 native binding 问题
反复踩坑。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 15:09:25 +08:00

37 lines
967 B
JSON

{
"name": "devperf-dashboard-backend",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "bun run --watch src/index.ts",
"build": "bun build src/index.ts --outdir=dist --target=bun",
"start": "bun run dist/index.js",
"db:generate": "drizzle-kit generate",
"db:migrate": "bun run src/db/migrate.ts",
"db:seed": "bun run src/db/seed.ts",
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@hono/zod-validator": "^0.4.0",
"bcryptjs": "^2.4.3",
"better-sqlite3": "^11.7.0",
"croner": "^9.0.0",
"dayjs": "^1.11.13",
"drizzle-orm": "^0.36.0",
"hono": "^4.7.0",
"jose": "^5.9.0",
"mysql2": "^3.22.0",
"uuid": "^11.0.0",
"zod": "^3.24.0"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/better-sqlite3": "^7.6.12",
"@types/uuid": "^10.0.0",
"bun-types": "^1.3.11",
"drizzle-kit": "^0.28.0",
"typescript": "^5.7.0"
}
}