can't find end of central directory
See original GitHub issueI upload one file which had about ten thousand lines of text, but it throw error. The error is “can’t find end of central directory”.
ERROR 24471 nodejs.Error: Corrupted zip : can't find end of central directory (uncaughtException throw 1 times on pid:24471)
at ZipEntries.readEndOfCentral (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/jszip.js:2270:19)
at ZipEntries.load (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/jszip.js:2332:14)
at new ZipEntries (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/jszip.js:2156:14)
at JSZip.module.exports [as load] (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/jszip.js:577:18)
at new JSZip (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/jszip.js:524:14)
at read_zip (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/xlsx.js:18863:24)
at Object.readSync [as read] (/home/servers/api.cloud.nh/node_modules/_xlsx@0.11.19@xlsx/xlsx.js:18931:69)
at FileStream.stream.once (/home/servers/api.cloud.nh/app/extend/application.js:200:22)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at FileStream.emit (events.js:208:7)
at emitReadable_ (_stream_readable.js:513:10)
at _combinedTickCallback (internal/process/next_tick.js:135:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Error: Corrupted zip : can't find end of central directory - XLSX
In my case I was working on .xls file. Opened the file and stored it as Excel Workbook (.xlsx). This solved my problem....
Read more >Error: Corrupted zip : can't find end of central directory #35
However, when I try to parse the data, I get the following error. Error: Corrupted zip : can't find end of central directory...
Read more >How to Fix End of Central Directory Signature Not Found
Method 2: Download the File Again As it turns out, the “end of central directory signature not found” is usually experienced when the ......
Read more >Can't find end of central directory : is this a zip file - GitLab
But, it keeps throwing this error "Can't find end of central directory : is this a zip file". Bye the way it reads...
Read more >unzip error "End-of-central-directory signature not found"
Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yeah, the file is ok. But little change in saving from request’s file stream. Look out when fs.createWriteStream deal with xlsx file Other people see this, please read https://github.com/SheetJS/js-xlsx#streaming-read
workbook.xlsx.readFile
… will try to load xlsx filethat is a compressed excel file so it will fail with this message :
_stack:'Error: Can't find end of central directory_
only try to use it on compressed excel file
if you want to load a csv file you need to use :
_workbook.csv.readFile_
if you want a regular excel (uncompressed) then :_workbook.excel.readFile_