html-pdf library is not working on deployed code which is on ec2 server, however on my local mac machine its working fine.
The error which i was getting is Error: html-pdf: Evaluation - ReferenceError: Can't find variable: $ Stack: at undefined
However when running debugging on my machine it worked fine.
What could be the reason? However on ec2 instance i checked in package.json file that html-pdf is there with correct version.
The template which i am giving has a missing closing head tag. So does this will impact on linux and not on windows/mac?
**pdf.create(template).toBuffer(function (err, buffer) {
if (err) {
reject({ message: 'Failed.' +'Error'+err});
} else {
resolve(buffer);
}
});**
Shagun Rai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.