hi ,i'm trying to use html-pdf module , but it throws "html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath" error ,
steps i tried to resolve :
1. installed html-pdf
2. rm -rf node_modules/phantomjs-prebuilt
(or npm uninstall phantomjs-prebuilt
)
3. npm install phantomjs-prebuilt@2.1.13
(and phantomjs-prebuilt@2.1.4
)
but no use , it was throwing same error , then i assignedoptions.phantomPath
to node_modules\phantomjs-prebuilt
after that it is throwing following error , please help
{"error":{"message":"spawn EACCES","stack":"Error: spawn EACCES\\n at _errnoException (util.js:1022:11)\\n at ChildProcess.spawn (internal/child_process.js:323:11)\\n at Object.exports.spawn (child_process.js:502:9)\\n at PDF.PdfExec [as exec] (/root/PGServerJs/node_modules/html-pdf/lib/pdf.js:88:28)\\n at PDF.PdfToFile [as toFile] (/root/PGServerJs/node_modules/html-pdf/lib/pdf.js:83:8)\\n
i tried to change the permissions of phantomjs , but still it is not working