Skip to content

Error: Failed to load native binding #55

@urielbitton

Description

@urielbitton

When i run the pdf parser in AWS Lambda i get an error in my cloudwatch logs: "Failed to load native binding"

My relevant code:

import { CanvasFactory } from "pdf-parse/worker";
import "pdf-parse/worker";
import { PDFParse } from "pdf-parse";

const buffer = await streamToBuffer(s3Obj.Body);

const parser = new PDFParse({ data: buffer, CanvasFactory });
const { text } = await parser.getText();
await parser.destroy();
const extractedText = text;

  • env: AWS Lambda Node JS 24 (arm64 arch)
  • pdf-parse version: 2.4.5
  • Node js 24 (Lambda)
  • input: A buffer of a pdf file

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions