WebViewer Version: 10.3.0
I have 2 questions.
I’m upgrading from 8.12.0 to 10.3.0 by installing package from npm, then copying everything inside the “@pdftron/webviewer/public” folder. It works fine; however, when I copied the file “webviewer.min.js”, which is outside the “public” folder, I got this error in runtime.
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "apryse-webviewer" has already been used with this registry
at target.<computed> [as define] (http://localhost:4200/polyfills.js:10718:27)
at Module.<anonymous> (http://localhost:4200/vendor.js:3923:20)
at n (http://localhost:4200/vendor.js:3276:19)
at Object.<anonymous> (http://localhost:4200/vendor.js:3326:23)
at n (http://localhost:4200/vendor.js:3276:19)
at http://localhost:4200/vendor.js:3310:19
at http://localhost:4200/vendor.js:3311:4
at http://localhost:4200/vendor.js:3264:30
at 90939 (http://localhost:4200/vendor.js:3265:2)
at __webpack_require__ (http://localhost:4200/runtime.js:23:42)
This error also occured after I completely removing old files and folders and copied everything from the npm package to my asset folder: no old files existed at all.
Why did this error occured?
also, when I just use the old “webviewer.min.js” from version 8.12.0 together with files/folders copied from “public” folder in 10.3.0 package, the log shown that the value of “webviewer.min.js” is “8.12.1” as in the following image for a while before the value become “10.3.0” later. I wonder why the version was not matched immediately?