Skip to content

Error on NodeJS v19 #1

@emretapci

Description

@emretapci

When I run the following code on NodeJS v19:

const { HTMLParser, TextParser, PDFParser } = require('@soyagaci/parser');
const fs = require('fs');
const file = { data: [...fs.readFileSync('./nvi-nufus-kayit-ornegi-belgesi-sorgulama.pdf')] };
PDFParser(file).then(console.log).catch(console.log);

I get the following error:

TypeError: doc.getPage is not a function
    at /Users/emre/projects/free/chat/node_modules/@soyagaci/parser/format/pdf.js:169:32
    at Generator.next (<anonymous>)
    at /Users/emre/projects/free/chat/node_modules/@soyagaci/parser/format/pdf.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/emre/projects/free/chat/node_modules/@soyagaci/parser/format/pdf.js:3:12)
    at parseSinglePage (/Users/emre/projects/free/chat/node_modules/@soyagaci/parser/format/pdf.js:168:12)
    at /Users/emre/projects/free/chat/node_modules/@soyagaci/parser/format/pdf.js:189:82
    at Generator.next (<anonymous>)
    at /Users/emre/projects/free/chat/node_modules/@soyagaci/parser/format/pdf.js:7:71
    at new Promise (<anonymous>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions