react-pdf: compilation error
Describe the bug Compiation error while starting.
I got this error:
Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined
at $$$reconciler (react-reconciler.development.js?b6f5:149)
at Object.eval (react-pdf.browser.es.js?6576:5903)
at eval (react-pdf.browser.es.js:6713)
at Object../node_modules/@react-pdf/renderer/dist/react-pdf.browser.es.js (bundle.js:988)
at __webpack_require__ (bundle.js:660)
at fn (bundle.js:86)
at eval (PDF.js:3)
at Object../src/frontend/component/PDF.js (bundle.js:23250)
at __webpack_require__ (bundle.js:660)
at fn (bundle.js:86)
my code looks like this:
// Create Document Component
import React, {Component} from "react";
import { Document } from '@react-pdf/renderer';
import {connect} from "react-redux";
// Text editor
// CSS
// i18n
import {translate} from 'react-i18next';
import {compose} from "redux";
class PDF extends Component {
constructor(props) {
super(props);
this.bindLibs();
this.state = {
};
}
render() {
const {t} = this.props;
return (
<Document>
</Document>
);
}
/**
* This function binds formatter functions
*/
bindLibs = () => {
}
}
export default compose(
translate('translations'),
connect()
)(PDF);
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (3 by maintainers)
I did non use this package
working now.
Now I a bit closer to working solution. It runs and compiles.
Now I got this:
__WEBPACK_IMPORTED_MODULE_6__react_pdf_renderer__.a.render is not a function