react-data-export icon indicating copy to clipboard operation
react-data-export copied to clipboard

issue in react js dependence added time Module not found: Can't resolve 'react-data-export' using

Open pranaydp opened this issue 6 years ago • 6 comments

hello there, facing an issue when adding dependencies... I tried using this npm install react-data-export --save

error:-Module not found: Can't resolve 'react-data-export'

the same dependencies added using... yarn add react-data-export Module not found: Can't resolve 'xlsx' in 'D:\OFFICE\workspace\georeact\node_modules\tempa-xlsx'

please tell me out how to solve and add this component

pranaydp avatar Dec 27 '18 07:12 pranaydp

Hi ,

I am faced same but I resolved using (npm install xlsx)

murali645 avatar Mar 24 '19 09:03 murali645

This didn't work for me. This is not a stable thing.

rhuanbarreto avatar Mar 17 '20 08:03 rhuanbarreto

Removing the following function from ods.js in tempa-xlsx worked for me. Its not required anyway.

var get_utils = function() { if(typeof XLSX !== 'undefined') return XLSX.utils; if(typeof module !== "undefined" && typeof require !== 'undefined') try { return require('../' + 'xlsx').utils; } catch(e) { try { return require('./' + 'xlsx').utils; } catch(ee) { return require('xl' + 'sx').utils; } } throw new Error("Cannot find XLSX utils"); };

Smriti29 avatar Mar 30 '20 12:03 Smriti29

Removing the following function from ods.js in tempa-xlsx worked for me. Its not required anyway.

var get_utils = function() { if(typeof XLSX !== 'undefined') return XLSX.utils; if(typeof module !== "undefined" && typeof require !== 'undefined') try { return require('../' + 'xlsx').utils; } catch(e) { try { return require('./' + 'xlsx').utils; } catch(ee) { return require('xl' + 'sx').utils; } } throw new Error("Cannot find XLSX utils"); };

Also removing one dot in this line > return require('./' + 'xlsx').utils; will make it work

hadihammad avatar May 19 '20 04:05 hadihammad

could not find tempa-xlsx in node_module

rvsharma avatar Sep 30 '20 09:09 rvsharma

https://github.com/securedeveloper/react-data-export/issues/85#issuecomment-483662347

solved for me

gdhelp03 avatar Dec 27 '20 04:12 gdhelp03