georgjaehnig / webpages-to-ebook

Create an EPUB from a list of URLs. Standing on the shoulders of Wget, Readability and Pandoc.
MIT License
193 stars 16 forks source link

TypeError: Cannot read property 'length' of undefined (book.content.length) #5

Closed tandriamil closed 6 years ago

tandriamil commented 6 years ago

Hi,

I have an error thrown when I try to execute the module with the definitions/slatestarcodex.base.yml files:

$ node index.js definitions/slatestarcodex.base.yml
[hidden_path]/webpages-to-ebook/index.js:24
var count = book.content.length;
                         ^

TypeError: Cannot read property 'length' of undefined
    at Object.<anonymous> ([hidden_path]/webpages-to-ebook/index.js:24:26)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
    at startup (internal/bootstrap/node.js:238:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)

Thank you.

georgjaehnig commented 6 years ago

Hi, definitions/slatestarcodex.base.yml ist just a base file. Use it only together with others slatestarcodex.* files, e.g.

node index.js slatestarcodex.top.yml slatestarcodex.base.yml

I've added a comment in cf7f9a7.