@react-pdf/renderer on production gives an error this.subset.encodeStream is not a function

Viewed 117

@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"

enter image description here

1 Answers

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.

Related