GitbookIO / gitbook-convert

CLI to convert an existing document to a GitBook.
102 stars 19 forks source link

TypeError: Cannot read property 'asUint8Array' of null #14

Open berthelemy opened 8 years ago

berthelemy commented 8 years ago

Hi there,

I'm getting this message when trying to convert a docx file:

Creating export folder... Creating assets folder... Creating summary file... Done. Converting docx file to HTML... /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/zipfile.js:14 var array = zipFile.file(name).asUint8Array(); ^

TypeError: Cannot read property 'asUint8Array' of null at Object.read (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/zipfile.js:14:39) at /usr/local/lib/node_modules/gitbook-convert/lib/converters/docx.js:28:24 at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/images.js:6:30 at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/document-to-html.js:178:13 at elementToHtml (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/document-to-html.js:68:13) at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/document-to-html.js:61:20 at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/node_modules/async/lib/async.js:227:13 at iterate (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/node_modules/async/lib/async.js:134:13) at async.eachSeries (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/node_modules/async/lib/async.js:150:9) at _asyncMap (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/node_modules/async/lib/async.js:226:9)

berthelemy commented 8 years ago

This error occurs when gitbook-convert is run with all the default options.