I am using react-data-export 0.6.0 in a setup with browserify (16.5.2) in gulp (4.0.2). When running my project in the browser, the line
import ReactDataExport from 'react-data-export';
in one of my ES6 files triggers the error message:
_prelude.js:1 Uncaught Error: Cannot find module 'jszip'
at o (_prelude.js:1)
at _prelude.js:1
at make_xlsx (xlsx.js:1344)
at Object. (xlsx.js:12576)
at Object. (xlsx.js:12578)
at Object./.../node_modules/tempa-xlsx/xlsx.js../dist/cpexcel (xlsx.js:12578)
at o (_prelude.js:1)
at _prelude.js:1
at Object./.../node_modules/react-data-export/dist/ExcelPlugin/components/ExcelFile.js.../elements/ExcelSheet (ExcelFile.js:19)
at o (_prelude.js:1)
This message appears even if I don't actually use the imported ReactDataExport.
I have seen your explanation how to set up webpack.config.js, but I don't know how to tell gulp to handle jszip as an external. I have tried many iterations of adding and removing dependencies and trying out different node and npm versions. Currently I am using node 16.0.0 and npm 7.10.0. Can you give some suggestion?
I am using react-data-export 0.6.0 in a setup with browserify (16.5.2) in gulp (4.0.2). When running my project in the browser, the line
import ReactDataExport from 'react-data-export';
in one of my ES6 files triggers the error message:
This message appears even if I don't actually use the imported ReactDataExport.
My package.json contains the lines
I have seen your explanation how to set up webpack.config.js, but I don't know how to tell gulp to handle jszip as an external. I have tried many iterations of adding and removing dependencies and trying out different node and npm versions. Currently I am using node 16.0.0 and npm 7.10.0. Can you give some suggestion?
Thanks a lot.