wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.
https://projects.wojtekmaj.pl/react-pdf
MIT License
9.11k stars 867 forks source link

Build not working with Next 15 #1841

Closed ivanpajon closed 3 weeks ago

ivanpajon commented 3 weeks ago

Before you start - checklist

Description

Configuration for using workerSrc in Next is not working. In local development with next dev is working, but when you try to do next build it fails. With the example of the sample projects also fails.

Steps to reproduce

  1. Try to do next build

Expected behavior

  1. It compiles and runs fine

Actual behavior

  1. It fails in building process

Additional information

Here is a sample repo. But literally you can use the official I mentioned above. And it fails with and without turbo mode enabled.

Environment

wojtekmaj commented 3 weeks ago
ivanpajon commented 3 weeks ago

In Next 14 and React 18 it's not working either... I tried with Next 15 and React 19 so it can be reproduced in Stackblitz.

wojtekmaj commented 3 weeks ago

Well, samples included in the repo are definitely working for me; otherwise there would be no release. If you encounter any issues with it, please report it while sharing the error message you got, and we'll work from here.