I have the same issue in nodejs
const jspdf = require('jspdf'); const file = new jspdf.jsPDF("p", "mm", "a4");
and it worked as intended