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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user