Open lahoti-piyush opened 1 year ago
It would help if you run npm rebuild
on the server side to build phantomjs
binaries for specific platforms. I have Linux VPS and it's helped me.
P.s.: I've no experience with AWS Lambda, so I can't provide direct instructions.
you will need to add a phantom js binary
and provide the path, along with that, you need to provide the path to pdf_a4_portrait.js
file
childProcessOptions: {
env: {
OPENSSL_CONF: "/dev/null"
}
},
localUrlAccess: true,
phantomPath: "/opt/nodejs/executables/executables/phantomjs_linux-x86_64",
script: "/opt/nodejs/executables/executables/scripts/pdf_a4_portrait.js"
};
In my case I have added these files in the layer and provided the path, add the above configuration in options Try downloading the phantom js from here, make sure you download the correct file according to OS in your lambda environment https://phantomjs.org/download.html
@lahoti-piyush did you find any solution?
So ?, Did you find any solutions? 2024 :'(
So ?, Did you find any solutions? 2024 :'(
yes, added a chromium-layer to lambda
AWS Lambda Runtime: Node.js 18.x