node-html-pdf icon indicating copy to clipboard operation
node-html-pdf copied to clipboard

Received the exit code '255'

Open AlessandroAnnini opened this issue 6 years ago • 1 comments

Hi I am using this script inside a folder of a create-react-app project because i need it there in order to use Netlify function (like aws lambda).

I am using options like this because otherwise it won't find pdf_a4_portrait.js:

const options = {
  script: './../../node_modules/html-pdf/lib/scripts/pdf_a4_portrait.js',
  format: 'A4'
};

but still i have this error:

Error: html-pdf: Received the exit code '255'
Can't open '../../node_modules/html-pdf/lib/scripts/pdf_a4_portrait.js'

    at ChildProcess.respond (/Users/sunrising/Documents/Projects/testproject/lambda/htmlToPdfBlob.js:25177:31)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

Is there any solution?

#366 didn't help

AlessandroAnnini avatar Mar 26 '18 09:03 AlessandroAnnini

Hi. Did you solve this issue? Where did you add the options object? Thanks

estebanmh95 avatar Dec 28 '21 16:12 estebanmh95