Reputation: 397
I have a application that generates PDF's using html-pdf
on nodejs, but after I made a deploy to the production server, I'm not able to generate. It gives this error:
'html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath'
And if I run npm install html-pdf
again, it gives this error
npm ERR! errno 1
npm ERR! [email protected] preinstall: `node installArchSpecificPackage`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
And this error replicates to other modules, but I made a turn around.
Runing node 13.7.0 and npm 6.9.0
Upvotes: 4
Views: 5086
Reputation: 7404
Can you try again with the -g
flag
npm install -g html-pdf
If still not working, execute after that:
npm link html-pdf
npm link phantomjs-prebuilt
from https://github.com/marcbachmann/node-html-pdf/issues/437#issuecomment-467463285
Upvotes: 1