julien-c / epub

node.js epub reader
https://www.npmjs.com/package/epub
Other
333 stars 307 forks source link

readFile hangs forever when loading any file #17

Open aloncarmel opened 9 years ago

aloncarmel commented 9 years ago

I dont know if im doing something wrong, but when i try to load a file

var EPub = require("epub");
    var epub = new EPub('EPUBFILE', '/images/IMG_ID/IMG_FILENAME', '/chapters/');

    epub.on("end", function(){
        // epub is now usable

                epub.getFile("coverstyle", function(error, data, mimeType){

                    console.log(error);
                    console.log(data);

                });

                res.send('done')

    });

Nothing works, it hangs forever.

Allaoua9 commented 8 years ago

Hi, I have the same issue, it hangs on forever !

Allaoua9 commented 8 years ago

Hi again,

You need to call epub.parse() after opening the file.

@julien-c you've done a great work, too bad the doc is not much clear.