react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

PDFDownloadLink is a web specific API

Open AlphaSteam opened this issue 1 year ago • 0 comments

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):

  1. Add latest react-pdf version to package.json (or any version after 3.0)
  2. Build the project with esbuild in esm mode
  3. Use PDFDownloadLink in any view
  4. 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

AlphaSteam avatar Jun 20 '24 06:06 AlphaSteam