Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build not working with Next 15 #1841

Closed
4 tasks done
ivanpajon opened this issue Jul 9, 2024 · 3 comments
Closed
4 tasks done

Build not working with Next 15 #1841

ivanpajon opened this issue Jul 9, 2024 · 3 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@ivanpajon
Copy link

ivanpajon commented Jul 9, 2024

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

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

  • Browser (if applicable): Any
  • React-PDF version: 9.1.0
  • React version: 18.3.1
  • Bundler name and version (if applicable):
@ivanpajon ivanpajon added the bug Something isn't working label Jul 9, 2024
@wojtekmaj
Copy link
Owner

  • Next.js 15 is not out yet
  • Next.js 15 contains breaking changes, specifically removes Terser minifier, while SWC minifier implementation was buggy
  • The Next.js issue in question was not resolved until last week's canary, specifically v15.0.0-canary.53, and v15.0.0-rc.0 is over 2 months old

@wojtekmaj wojtekmaj closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
@wojtekmaj wojtekmaj added the invalid This doesn't seem right label Jul 10, 2024
@wojtekmaj wojtekmaj changed the title Build not working with Next Build not working with Next 15 Jul 10, 2024
@ivanpajon
Copy link
Author

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants