Hello. Get following error, when import package
linebreaker.js:15 Uncaught TypeError: fs.readFileSync is not a function
at Object.eval (linebreaker.js:15)
at Object.eval (linebreaker.js:161)
at eval (linebreaker.js:163)
at Object.<anonymous> (bundle.js:10711)
at __webpack_require__ (bundle.js:556)
at fn (bundle.js:87)
at eval (textTools.js:7)
at Object.<anonymous> (bundle.js:10702)
at __webpack_require__ (bundle.js:556)
at fn (bundle.js:87)
i found only one readFileSync, in pdfmake.min.js
Attach a sample of what you are doing. And what are you using client-side (browser) or server-side?
node 8.9.4
npm 5.6.0
yarn 1.3.2
Windows 10.
create-react-app pdfmake
cd pdfmake
yarn add pdfmake
Open App.js, add import pdfMake from "pdfmake" at the top
has error in Chrome 64.
In readme is described how to import pdfmake in js frameworks, see: https://github.com/bpampuch/pdfmake#using-javascript-frameworks
Omg, i'm a lazy idiot. Sorry, thank you.
Most helpful comment
In readme is described how to import pdfmake in js frameworks, see: https://github.com/bpampuch/pdfmake#using-javascript-frameworks