-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
NuxtJS: Error: Could not load html2canvas: Error: Cannot find module 'html2canvas' #2867
Comments
@zhuiye your issue solved or not ? |
@HackbrettXXX what's about this issue |
@KamranMaqbool Should have been fixing in #2865, has not been published to npm yet. |
@HackbrettXXX when are you published to npm |
This is fixed. I will prepare a release next week. |
@HackbrettXXX have you fixed this issue (mean's upload release or not) ? |
I am trying to use jsPdf in Nuxtjs Application
We have the following code:
import in .vue file
import jsPDF from 'jspdf';
onClick Event for download HTML to pdf
<b-button title="Download" @click="downloadPdf(article.contents)" variant="light" size="sm"> <b-icon icon="file-earmark-arrow-down" variant="primary"></b-icon> </b-button>
in my script section my download function are
downloadPdf(contents) { if (process.browser) { const doc = new jsPDF.default() debugger doc.html(contents, { callback: function(doc) { doc.save(); } }); } },
in My Case contents are HTML string like:
<p>ksdfksd fsd fksd fdfsd</p>
i want to convert HTML String to PDF Document but
Give error in Console are
Uncaught (in promise) Error: Could not load html2canvas: Error: Cannot find module 'html2canvas'
The text was updated successfully, but these errors were encountered: