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
1 Answer
Reset to default 10Delete 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.
本文标签:
版权声明:本文标题:javascript - @react-pdfrenderer on production gives an error this.subset.encodeStream is not a function - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742238084a2438445.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论