Few things to watch out for, version 7 made all page APIs 1-indexed, and version 8 made changes to documentViewer and annotationManager which are now available from instance.Core.
Great tutorial! Thank you! I unfortunately keep getting this error,
webviewer.min.js:1 Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions.
The lib folder needs to be served as a static asset. For example in React app, it is the public folder. If you still need to proceed hosting them elsewhere, you can refer to this guide: PDFTron.