pdf2json icon indicating copy to clipboard operation
pdf2json copied to clipboard

something is colossaly f***** up in the exports for version 3.1.0

Open philkunz opened this issue 1 year ago • 2 comments

Why is the default module suddenly 1.75MB and has no default export?

philkunz avatar Apr 30 '24 15:04 philkunz

Unfortunately 3.1.1 is giving us trouble as well:

C:\...\node_modules\ts-node\dist\index.js:851
            return old(m, filename);
                   ^
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\...\node_modules\pdf2json\dist\pdfparser.js from C:\...\src\my-file.ts not supported.
Instead change the require of pdfparser.js in C:\...\src\my-file.ts to a dynamic import() which is available in all CommonJS modules.
    at require.extensions.<computed> [as .js] (C:\...\node_modules\ts-node\dist\index.js:851:20)
    at Object.<anonymous> (C:\...\src\my-file.ts:8:44)
    at m._compile (C:\...\node_modules\ts-node\dist\index.js:857:29) {
  code: 'ERR_REQUIRE_ESM'
}

3.0.5 seems to be fine

abrenoch avatar May 01 '24 13:05 abrenoch

I can confirm this colossally on-point Issue :)

greguz avatar May 10 '24 12:05 greguz