cyntler / cyntler/react-doc-viewer
pdfjs isNodejs throwing error
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
Has someone ever had this issue?
index.4b5b7b3f.js:2719 Uncaught TypeError: Cannot convert object to primitive value
at Object. (index.4b5b7b3f.js:2719:3030)
at __w_pdfjs_require__ (index.4b5b7b3f.js:2748:6827)
at Object.defineProperty.value (index.4b5b7b3f.js:2719:1896)
at __w_pdfjs_require__ (index.4b5b7b3f.js:2748:6827)
at Object. (index.4b5b7b3f.js:2715:10540)
at __w_pdfjs_require__ (index.4b5b7b3f.js:2748:6827)
at Object. (index.4b5b7b3f.js:2713:1163)
at __w_pdfjs_require__ (index.4b5b7b3f.js:2748:6827)
at index.4b5b7b3f.js:2748:10854
at index.4b5b7b3f.js:2748:11451
This is thrown from pdfjs-dist used by react-pdf. I don't see this error on my local dev environment, for non-dev environment built on CI/CD the above is thrown. The following line of code in pdfjs lib is the one that throws the error:
const isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser");
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.