fix: downgrade pdf-parse to 1.1.1 to eliminate native dependency

pdf-parse@2.4.5 depends on @napi-rs/canvas (native Skia binary compiled
with AVX instructions) which crashes with SIGILL on the Synology NAS CPU.
Version 1.1.1 is pure JavaScript and works on any architecture.
This commit is contained in:
vakabunga
2026-03-14 14:03:14 +03:00
parent 5fa6b921d8
commit 723df494ca
4 changed files with 34 additions and 237 deletions

View File

@@ -27,10 +27,6 @@ FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
# @napi-rs/canvas (dep of pdf-parse) ships a musl pre-built binary that
# needs these compatibility / font libraries at runtime.
RUN apk add --no-cache libc6-compat fontconfig freetype
COPY --from=build /app/backend/dist ./dist
COPY --from=build /app/backend/package.json ./package.json
COPY --from=build /app/node_modules ./node_modules