Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

571
Views
cannot find module 'jspdf-autotable' and 'jspdf' or its corresponding type declarations

mycomponent.ts

import  jsPDF  from 'jspdf';
import autoTable from 'jspdf-autotable';

export class Component implements OnInit {
.
.
.
 exportPdf() {

    const doc = new jsPDF('p', 'pt');
 columns = [...]

    autoTable(doc, {
      columns: this.columns,
      body: this.data,
      didDrawPage: (dataArg) => {
        doc.text('data', dataArg.settings.margin.left, 10);
      }
    });
    doc.save('data.pdf');
  }
}

package.json

 "dependencies": {

    "jspdf": "^2.5.1",
    "jspdf-autotable": "^3.5.23"

}
 

I installed my npm packages with npm i jspdf and npm i jspdf-autotable but the same errors persist. I don't understand what should I do. Are the versions wrong?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have to install @types/jspdf and @types/jspdf-autotable as dev-dependencies.

If you use yarn:

yarn add -D @types/jspdf @types/jspdf-autotable

For npm use:

npm install @types/jspdf @types/jspdf-autotable --save-dev
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!