Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Segmentation Fault" : when using xlsx npm module in node.js app on linode

I'm running a node.js app on linode server(Cent Os 7).

My app is using xlsx npm module for excel conversion and is giving Segmentation Fault when my code reaches :

var xlsx = XLSX.read(file.data, {type: "binary"});
like image 322
vashishatashu Avatar asked Mar 18 '23 13:03

vashishatashu


1 Answers

You're probably running node.js v0.10.31 or higher.

I was getting this problem when switching my workplace from my macbook to a Ubuntu desktop. And after some hours searching around, I found this github issue on another repository: https://github.com/SheetJS/j/issues/4. And it's exactly the same problem of js-xlsx.

I've downgraded my node.js to v0.10.30 and everything worked fine. Hope this get fixed soon.

EDIT: the issue came from https://github.com/joyent/node/issues/8208, which was fixed in node v0.10.32

like image 184
William Dias Avatar answered Apr 03 '23 03:04

William Dias