react-pdf
react-pdf copied to clipboard
PDFDownloadLink is a web specific API
Describe the bug
I get PDFDownloadLink is a web specific API. You're either using this component on Node, or your bundler is not loading react-pdf from the appropriate web build. even though I'm using a completely client side React. I'm using esbuild in esm format.
To Reproduce Steps to reproduce the behavior including code snippet (if applies):
- Add latest react-pdf version to package.json (or any version after 3.0)
- Build the project with esbuild in esm mode
- Use PDFDownloadLink in any view
- Get the error
Expected behavior No error should be shown. Should be using the browser version of the renderer. No idea why it's using the node version.
Desktop (please complete the following information):
- OS: Linux
- Browser: Firefox, Chromium
- React-pdf version: =>3.0