Issue with node_modules : Can't resolve 'fs' in node_modules/xlsx

Viewed 122

I have a task to export data to excel and wanted to use react-export-excel library. Unfortunately it throws me 2 errors like below. enter image description here When I tried to google it, it was recommended to update webpack.config.js and add this code

node: {fs: 'empty'},
externals: [
    {'./cptable': 'var cptable'},
    {'./jszip': 'jszip'}
 ]

The problem is that I don't have such file in my repository. How shall I then solve the problem ? Or You have other suggestions how to overcome it ?

0 Answers
Related