bauhausjs / phantom-html2pdf

Node module to generate PDFs from HTML via PhantomJS
MIT License
112 stars 47 forks source link

Calling an asynchronous function without callback is deprecated - fs.close() #47

Closed SimonMARTIN87 closed 7 years ago

SimonMARTIN87 commented 7 years ago

Hi guys. Thank you for this very good package. But using convert() in Node 7.4.x produces :

DeprecationWarning: Calling an asynchronous function without callback is deprecated. at makeCallback (fs.js:104:12) at Object.fs.close (fs.js:522:20) at .../node_modules/phantom-html2pdf/lib/phantom-html2pdf.js:131:14

Actually, fs.close(tmpFd);

Should use fs.closeSync.

May I create a PR?

dustin-H commented 7 years ago

Hi @SimonMARTIN87,

thanks for reporting! PR is very welcome. I will merge it!

Cheers, Dustin

dustin-H commented 7 years ago

Closed with #48