-
Notifications
You must be signed in to change notification settings - Fork 79
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
Working local but not working in server #100
Comments
Try reinstall the latest version |
Maybe this is because it uses headless chrome and your server does not have chrome installed even if it's installed maybe it cannot find the path to chrome on the server. I had a similar issue using puppeteer and I fixed it by installing chrome on the server and giving it the path to chrome. |
Same issue here also I am using pdf-creator-node const document = {
locally its working fine pdf is generating in download folder but when hosted in Azure its not working as expected... |
@vignesh291999 were you able to solve the problem? |
I have fixed this issues Just try to install chromium in Cloud Servers |
@drilonpa |
@TilliSp did you find any solution? |
Ahh the reason this does not work when being deployed to any platform is that this package is using 'html-pdf' which is a development only library - all its dependencies are devDependencies. So when you deploy to production none of its dependencies get installed. This is really poor decision making from @hajareshyam who used that package. It actually seems that this author has never used this package in production. Furthermore html-pdf package is deprecated along with all its dependencies. I would imagine this package to be slow and resource intensive because it is using phantomjs which is a headless browser. The author should do us a favour and remove this package from github and npm because this has become a massive waste of time. |
@TilliSp |
Error: spawn /home/node/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:485:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'spawn /home/node/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs', path: '/home/node/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs', spawnargs: [ '--local-url-access=false', '/home/node/node_modules/html-pdf/lib/scripts/pdf_a4_portrait.js' ] }
The text was updated successfully, but these errors were encountered: