You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using "jspdf" version "2.3.1".
My code working fine with CRETE-REACT-APP, but after migrating to VITE, while exporting to pdf I am getting r3.writeFileSync is not a function error.
After some google I understood that fs is externalized in VITE and jsPDF is using require('fs') method of loading fs library.
I tried providing aliases and node module polyfills but nothing is working. Please help me.
This is the error I am getting.
r3.writeFileSync is not a function
at v2.save (jspdf.js:5811:10)
The text was updated successfully, but these errors were encountered:
I am using "jspdf" version "2.3.1".
My code working fine with CRETE-REACT-APP, but after migrating to VITE, while exporting to pdf I am getting r3.writeFileSync is not a function error.
After some google I understood that fs is externalized in VITE and jsPDF is using require('fs') method of loading fs library.
I tried providing aliases and node module polyfills but nothing is working. Please help me.
This is the error I am getting.
r3.writeFileSync is not a function
at v2.save (jspdf.js:5811:10)
The text was updated successfully, but these errors were encountered: