Open rickshawhobo opened 4 years ago
Hmm could you try and delete your /node_modules folder and do an npm install
and then do the npm i vue-html2pdf
?
Same issue as this https://github.com/kempsteven/vue-html2pdf/issues/26
I think the ssh format is ssh://git@github.com:eligrey/FileSaver.js.git
I tried the solution btw and it does not work for me. Same error.
Are you still experiencing this problem? I tried replicating it in a fresh project using vue cli and I ran the command npm i vue-html2pdf
and it works.
I researched and it seems there is a problem in the package jsPDF which is a package that used by html2pdf.js
I have found no way to make this work, unless I can install jsPDF 1.4.1 BEFORE installing html2pdf but in the package.json file it always tries to install html2pdf before jsPDF. I really don't know how it works for you.
Crap that's weird, I can't replicate it and it only happens with some selected people.
I believe this happened when I upgraded from html2pdf.js 0.9.0 to 0.9.2, which used a more latest version of jsPDF that could have caused the error, I'm thinking of downgrading the package.
I also saw a few people resolving it by installing jspdf first npm i jspdf
then installing html2pdf.js
,
or in this case npm i vue-html2pdf
I also saw this, as per the creator of html2pdf.js, you could also try this solution
Hi, the same issue for me. It's related to loading dependency issue in jsPDF https://github.com/MrRio/jsPDF/issues/2208
I found solution: 1) Install jspdf 1.5.2: npm i jspdf@1.5.2 2) install this plugin: npm i vue-html2pdf Works for me
Getting this error when doing
npm i vue-html2pdf