We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeError: Cannot set properties of undefined (setting 'workerSrc')\n at ./node_modules/react-pdf/dist/esm/index.js
import React, { useState } from "react"; import { Document, Page, pdfjs } from 'react-pdf'; import "react-pdf/dist/esm/Page/AnnotationLayer.css"; import "react-pdf/dist/esm/Page/TextLayer.css"; pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.js`;
I have just imported this
My react app should load
My react app is not loading
No response
The text was updated successfully, but these errors were encountered:
Hey did you check that you don't have pdfjs-dist in your package.json? I had the same issue and fixed it by removing pdfjs-dist dependency
pdfjs-dist
Sorry, something went wrong.
@wojtekmaj Could you please provide us a fix for v5.7.2
Sorry, not a chance. This version is no longer supported. I don't have capacity to maintain multiple versions.
No problem, I can understand, we will upgrade to the latest version. Thanks
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.
No branches or pull requests
Before you start - checklist
Description
TypeError: Cannot set properties of undefined (setting 'workerSrc')\n at ./node_modules/react-pdf/dist/esm/index.js
Steps to reproduce
I have just imported this
Expected behavior
My react app should load
Actual behavior
My react app is not loading
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: