Invalid ELF header

I get the following error when I try to load the pdfnet library on aws lambda

INFO Error: Error: /opt/nodejs/node_modules/@pdftron/pdfnet-node/lib/addon.node: invalid ELF header at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:101:18) at Object.loadWorker (/opt/nodejs/node_modules/@pdftron/pdfnet-node/lib/pdfnet.js:40:357) at /opt/nodejs/node_modules/@pdftron/pdfnet-node/lib/pdfnet.js:1163:363 at new Promise (<anonymous>) at Object.t.preloadWorker (/opt/nodejs/node_modules/@pdftron/pdfnet-node/lib/pdfnet.js:1161:233) at Object.t.preloadPDFWorker (/opt/nodejs/node_modules/@pdftron/pdfnet-node/lib/pdfnet.js:1161:157) { code: 'ERR_DLOPEN_FAILED' }

nodejs version is 14.x
pdftron installed by nodejs version 14.x

does it not work in aws lambda nodejs evironment ?


Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


This is a native binary issue, not a NodeJS issue.

What is the exact architecture of your Linux lambda? x86_64? arm64?

Alternatively, here is someone who had similar issue and found it was due to copy error.