securedeveloper / react-data-export

Export dataset in react.
https://securedeveloper.github.io/react-data-export/
MIT License
179 stars 194 forks source link

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

Open pranaydp opened 5 years ago

pranaydp commented 5 years ago

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

murali645 commented 5 years ago

Hi ,

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

rhuanbarreto commented 4 years ago

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

Smriti29 commented 4 years ago

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"); };

hadihammad commented 4 years ago

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

rvsharma commented 3 years ago

could not find tempa-xlsx in node_module

gdhelp03 commented 3 years ago

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

solved for me