-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using \'options.phantomPath #437
Comments
Hi, I'm facing the same issue. Thank you for helping |
try to install like I do......... |
html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath' |
In my case this solved the issue: I am not an expert, but it seems that since html-pdf is installed globally you have to link these global installations to your project. So my installation looks like this:
If this is somehow not the real way to go, I would be happy about other suggestions as I am planning to use this for an upcoming project. |
Thanks @Paul-JO Working fine |
Great that it works @balaji4191 |
Are you using html-pdf on the frontend or the server? I've been using it on the server without any trouble but I just tried to use it on the frontend in order to save the data transfered (up to 1mb per generated PDF), and this error happened... |
aa |
I also encountered this problem. |
I have Win10 and Node 6.11 and NPM 6.6.0-next.0 with And pdf.create(...) works good now. |
An |
I'm using |
First install phantomjs using, Try if "phantomjs -v" works. If works, then type "which phantomjs", this is where the /path/to/phantomjs Then edit /usr/local/bin/html-pdf > lib > pdf.js This solved the problem for me. |
Install PhantomJs https://www.vultr.com/docs/how-to-install-phantomjs-on-ubuntu-16-04 Then in the htm-pdf module |
This worked for me Running |
This one helps me too. Thanks a ton @VijayakumarManickam |
In html-pdf option, we have a property phantomPath: // Script options The script to run in Docker file: |
In Notice I am mentioned I was able to run thie library by above methods on all devices without any global installations. |
Very thanks this solution work for me in serverless. My steps were:
Then 🚀 |
I faced the same error and I downgrade my node version from v16.14.1 to v14.18.1 and it is working fo me now |
This is how I resolved mine. I performed an upgrade on my Docker node, transitioning from |
This was it for me although |
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
(ornpm uninstall phantomjs-prebuilt
)3.
npm install [email protected]
(and[email protected]
)but no use , it was throwing same error , then i assigned
options.phantomPath
tonode_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
The text was updated successfully, but these errors were encountered: