RedBackSpider / node-red-contrib-pdfjs

A Node-RED node to extract PDF text content.
0 stars 6 forks source link

Error on install #5

Closed michaelblight closed 3 years ago

michaelblight commented 3 years ago

Is there special setup required for this node? I'm using the Node Red 1.3.5. After I installed it through the Palette, within the Palette Manager in the list of installed nodes it shows the following error "SyntaxError: Unexpected token . (line:3)".

michaelblight commented 3 years ago

Ah! The pdfjs-dist code uses optional chaining, which is node.js 14. I'm using NR docker images, which use version 10 or 12.

I changed pdfjs-dist/build/pdf.js to pdfjs-dist/es5/build/pdf.js and the error clears.