react-pdf
react-pdf copied to clipboard
File is not defined
When doing SSR with react, File is not defined.
file: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.instanceOf(File), _react.PropTypes.instanceOf(Blob), _react.PropTypes.shape({
[1] ^
[1]
[1] ReferenceError: File is not defined
[1] at Object.<anonymous> (/Users/raul/Work/Everreal/er-prism-web/node_modules/react-pdf/es5/react-pdf.js:440:90)
[1] at Module._compile (module.js:571:32)
[1] at Module._extensions..js (module.js:580:10)
[1] at Object.require.extensions.(anonymous function) [as .js] (/Users/raul/Work/Everreal/er-prism-web/node_modules/babel-register/lib/node.js:152:7)
[1] at Module.load (module.js:488:32)
[1] at tryModuleLoad (module.js:447:12)
[1] at Function.Module._load (module.js:439:3)
[1] at Module.require (module.js:498:17)
[1] at require (internal/module.js:20:19)
[1] at Object.<anonymous> (/Users/raul/Work/Everreal/er-prism-web/src/universal/common/compone
[1] nts/PdfRenderer/PdfRenderer.js:4:1)
Hey @RaulTsc, this comes as a surprise to me. Would you please temporairly change your package.json so it would say
"react-pdf": "git+ssh://[email protected]/wojtekmaj/react-pdf.git#fix-file-undefined"
and see if it does the job for you?
Thank you for your help!
Fixed in 2.1.0.