natergj / excel4node

Node module to allow for easy Excel file creation
MIT License
1.38k stars 215 forks source link

TypeError: deepmerge is not a function #258

Closed sebzapata closed 5 years ago

sebzapata commented 5 years ago

Describe the bug Installed using npm i excel4node. After starting the project, when I click the button to create a workbook, which runs const wb = new xl.Workbook(); I get the error 'TypeError: deepmerge is not a function'

Environment (please complete the following information):

Additional context Using in a project I am making where after clicking a 'Download data' button, the data is downloaded into an .xlsx document

natergj commented 5 years ago

@sebzapata Are you using some sort of packaging library (Webpack, rollup, gulp, etc) to package your app to run in a web browser? excel4node currently does not support running in a web browser and I've seen others with this issue when trying. A sample project that demonstrates the issue would be very useful for troubleshooting.

sebzapata commented 5 years ago

Yes, I'm using react-scripts which I believe uses webpack. I'm not sure how to show you a sample project demonstrating the issue, but for the project I'm making, I have a webpage which keeps track of staff in an office. I want the user to be able to download this data into an Excel spreadsheet, ideally along with an image, by clicking a 'Download data' button. If excel4node is not able to do this, are you able to recommend another library that could?

Thank you

fernandoruaro commented 5 years ago

Hey guys, I was able to fix this by updating the deepmerge version. Here is the PR with the fix: https://github.com/natergj/excel4node/pull/263

reestolonio commented 5 years ago

Any update on this?

natergj commented 5 years ago

version has been updated with PR https://github.com/natergj/excel4node/pull/275 and will be released with v1.7.1 shortly