admin管理员组

文章数量:1334396

@react-pdf/renderer stopped working on the production machine, everything is fine on the local machine.

I don't know how to find a solution for this problem online

What can this error be related to? I will be very grateful for your help

This library worked on the site for more than a year, but now it has stopped. The site is written in laravel 9 with react

"@react-pdf/renderer": "2.0.19"

@react-pdf/renderer stopped working on the production machine, everything is fine on the local machine.

I don't know how to find a solution for this problem online

What can this error be related to? I will be very grateful for your help

This library worked on the site for more than a year, but now it has stopped. The site is written in laravel 9 with react

"@react-pdf/renderer": "2.0.19"

Share Improve this question edited Sep 14, 2022 at 13:16 Mr. Byte asked Sep 14, 2022 at 11:27 Mr. ByteMr. Byte 932 silver badges7 bronze badges 2
  • 1 ReactPDF.render() is a Node-only API to save pdfs in disk. You are using this lib in a web environment so this method won't be available. Check this issue : github./diegomura/react-pdf/issues/341 – debugger Commented Sep 14, 2022 at 11:30
  • 1 I am getting the same error when trying to use a registered font. – Drew Commented Sep 19, 2022 at 6:35
Add a ment  | 

1 Answer 1

Reset to default 10

Delete Font.register({}) and use some default font from documentation or install the latest version react-pdf/renderer.

npm i @react-pdf/renderer@latest

For me work fine.

本文标签: