webviewer-ui
webviewer-ui copied to clipboard
[Bug] hot update failed for module "./src/components/App/App.js". Last file processed: "./src/helpers/getHashParameters.js".
Verison [8.6] [605ae39]
Hi,
I am trying to get going, but hit with an error when I try and run it. I have followed the steps in the readme to get going. Maybe there is something else I need to do...?
Steps to produce:
-
Using VSCode
-
New Folder "webviewer-ui-8"
-
Cloned "https://github.com/PDFTron/webviewer-ui"
-
npm install --legacy-peer-deps
-
npm build
-
npm start
-
Chrome opens, and shows above error.
Also I tried taking the built version of WebViewer-UI and using this in our application instead of v7.2. Also getting an error relating to "getHashParameter"
Any suggestions?
Duplicate of https://github.com/PDFTron/webviewer-ui/issues/945 which you closed because there was not enough information.....
Hi @euangordon,
Have you copied over the WebViewer core dependencies in your repo? The first console error shows a 404 when the viewer tried to get the webviewer-core.min.js
.
The preferred method to install them is to use the NPM package.
Install WebViewer Core Dependencies
The preferred method to install the Core dependencies is to use the [WebViewer NPM package](https://www.pdftron.com/documentation/web/get-started/npm/#1-install-via-npm).
Once installed, copy the Core folder into the path being used by the viewer for its dependencies (/lib by default).
You can also run the download-webviewer
script in this repo, but we find that sometimes fails due to one of the dependencies used to unzip the download.
I was able to do a fresh install of this repo following the steps and was able to run it, so I suspect it's just a matter of making sure the lib folder contains all the required files.
Not sure if this is actually a duplicate of #945, since the error appears to be different there and there is no information regarding the console output, but I'll tag @rahul05ranjan here in case this helps.
@bollain Thanks for your help. Still getting a JS error relating to the version, even though it is the latest....
Hi @euangordon,
This error becomes relevant when you are actually deploying the WebViewer solution. If you are doing dev on the UI you can ignore this.
I am assuming you are forking our UI to customize it? In this case, when you build the solution and copy the minified UI files to your WebViewer project, this error will go away if you've setup the lib correctly with all the required dependencies.
If you want to get rid of this error while in dev you can change the URL in the file dev-server.js
to load the app in this URL:
http://localhost:3000/#d=${sampleURL}&a=1&webViewerJSVersion=8.6.0
// or whatever version you are using
https://github.com/PDFTron/webviewer-ui/blob/8.6/dev-server.js#L53
This message was added recently, so I'll add an item to our backlog to not show it/suppress it when the UI is started in dev mode.
Not sure if this is actually a duplicate of #945, since the error appears to be different there and there is no information regarding the console output, but I'll tag @rahul05ranjan here in case this helps.
I will put here the steps to reproduce the error.