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

I using Pdf-node-creator for generating pdf in my node application, It was working fine in local environment , But in production I get the below Error

Open ghost opened this issue 2 years ago • 5 comments

[Error: ENOENT: no such file or directory, open 'C:\tmp\html-pdf-11516.pdf'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\tmp\html-pdf-11516.pdf' }

ghost avatar Mar 14 '22 09:03 ghost

is your production environment also windows? If so, maybe permissions issues on c:\tmp. If this is a docker image, you need to make sure you have write access and a volume attached to it.

skulas avatar Mar 30 '22 15:03 skulas

yes my production environment is also windows, no there is no temp file in c:/ . Actually I found the answer that in virtual machines we don't have permission to use temp memory so we got this error.

ghost avatar May 30 '22 09:05 ghost

i got the same problem on production using heroku. The solution for me was creating a new env var OPENSSL_CONF with value /dev/null.

https://prnt.sc/VaOabzLAXFlO

i added to heroku env vars and it worked for me.

scush989898 avatar Sep 13 '22 04:09 scush989898

@scush989898 Thank you very much. I struggled with this problem for close to 5 days now. Your solution worked for me

panshak avatar Jun 30 '23 13:06 panshak

@scush989898 please will you mind to share why this solution fixed the problem?

panshak avatar Jun 30 '23 13:06 panshak