question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rollup build cause unexpected error with the last version of jspdf

See original GitHub issue

Since we use the last version of jspdf we can’t run any build on our app, we get the following error:

image

We use it as import import { jsPDF } from 'jspdf';.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
HackbrettXXXcommented, Oct 7, 2020

You might also define canvg as external if you don’t use the addSvgAsImage function. See the readme for details.

0reactions
RoXuScommented, Oct 7, 2020

ok ok we can’t add commonjs to our rollup but we can wait an esm version of @babel/runtime… Thx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rollup build cause unexpected error with the last version of jspdf
This looks like your canvg installation is corrupted. Could you try removing the node_modules folder and running npm install again?
Read more >
Rollup build cause unexpected error with the last version of jspdf
Since we use the last version of jspdf we can't run any build on our app, we get the following error: image.
Read more >
Rollup: dealing with dependencies that are typescript files ...
Rollup : dealing with dependencies that are typescript files. Getting Error: Unexpected token - Stack Overflow. Stack Overflow for Teams – Start collaborating ......
Read more >
前端使用jspdf生成PDF通过ajax传输后台生成PDF文件
toDataURL('image/jpeg', 1.0) var pdf = new jsPDF('', 'pt', 'a4') //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89) ...
Read more >
pdf-lib - npm
Create and modify PDF files with JavaScript. Latest version: 1.17.1, last published: a year ago. Start using pdf-lib in your project by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found