built project but npm start fails #81
|
Hello RussCoder, my name is Giulio and I was looking into this project and tried to build and test it. Error: There is no DjVu object! You have to include the DjVu.js library first! 15 | * Also it encapsulates the logic of getting the global DjVu object.
Plus other errors Any idea why? Many thanks for any help |
Replies: 2 comments 2 replies
|
I think I saw it. You need to include DjVu.js library in your main html page. If you go to view-source:https://djvu.js.org/ then you'll see this sequence of includes: <script src="[/assets/dist/djvu.js](view-source:https://djvu.js.org/assets/dist/djvu.js)"></script
<script src="[/assets/dist/djvu_viewer.js](view-source:https://djvu.js.org/assets/dist/djvu_viewer.js)">djvu.js is a library, djvu_viewer.js is a viewer and .. read again: "You have to include the DjVu.js library first!" |
|
Hello, Giulio! That's because you started the viewer without building the library at least once. In the root directory of the project run: It will build everything. Then you can start the viewer and work only with it. The library and the viewer have separate configs, so you should either build the library once or run |
Hello, Giulio!
That's because you started the viewer without building the library at least once.
In the root directory of the project run:
It will build everything. Then you can start the viewer and work only with it.
Alternatively you can build only the library, in the
libraryfolder runnpm installandnpm run build- the library bundle will be copied to the viewer's directory. If you want to change the library then runnpm startthere - the library will be recreated on each change.The library and the viewer have separate configs, so you should either build the library once or run
npm startin two consoles - one for the library and one for the viewer.