epub.js
epub.js copied to clipboard
ReferenceError: ePub is not defined
Hi,
I cloned the github into my document root directory.
I navigated the browser to /examples/spreads.html
The error in the console is: ReferenceError: ePub is not defined
This is the line:
// Load the opf var book = ePub(url || "https://s3.amazonaws.com/moby-dick/moby-dick.epub");
I did a wget on the URL and indeed the file is there.
Any clue what is problem?
because the epubjs library is not included in the github project and the example files are loading it from ../dist/epub.js
- look the html header element
To make it work there is multiple solutions:
- Manually build the project then use the output javascript file
- change the included file to load the source files
- And the easiest way is to do
npm install epubjs --save
then navigate to node_modules/epubjs/dist and use the one that the developers uploaded to npmjs
hi, what does it mean "use the one that the developers uploaded to npmjs", cause i do see that there is an epub.js file in my node modules?