ApryseSDK / webviewer-ui

WebViewer UI built in React
Other
408 stars 354 forks source link

[Bug] npm start not works #927

Closed aveeday closed 3 years ago

aveeday commented 3 years ago

WebViewer version: 8.1, 7.3

The current behavior Errors displayer on start dev server

hot update was not successful
hot update failed for module "./src/components/App/App.js". Last file processed: "./src/components/PageManipulationOverlay/PageRotationControls/index.js".
ERROR in ./src/components/PageManipulationOverlay/PageManipulationOverlay.js
Module not found: Error: Can't resolve './PageManipulationOverlay.scss' in '.\src\components\PageManipulationOverlay'

The expected behavior Dev server starts

Steps to reproduce

npm install
npm run download-webviewer
npm start
bollain commented 3 years ago

Hi @aveeday ,

Thanks for reporting this. I have made a fix on my end, which will be reflected on this repo in the next day or two. In the meantime, you can delete this line from PageManipulationOverlay.js:

import './PageManipulationOverlay.scss';

This file is actually empty so there are no issues with removing it.

Can you clarify if you can build 7.3 without issues? The PageManipulationOverlay was added in 8.1 so 7.3 should not be affected.

michaelpeterlee commented 3 years ago

We cannot upgrade to your default/main 8.1 branch. When we remove the redundant code, it still errors.

michaelpeterlee commented 3 years ago

Can you please advise when this is likely to be fixed so we can schedule, thanks.

bollain commented 3 years ago

@michaelpeterlee the PR for the fix is here, it will be merged shortly: https://github.com/PDFTron/webviewer-ui/pull/930

There is an issue with the latest version of the webviewer-react-toolkit. While we investigate this, reverting to version 0.7.2 fixes the error.

The PR also removes the redundant line of code.

michaelpeterlee commented 3 years ago

Thanks, however npm start now renders the following error:

hot update failed for module "./src/components/App/App.js". Last file processed: "./src/helpers/getHashParams.js".

bollain commented 3 years ago

Hi Michael, I'm not able to reproduce this error - I suspect it is from the renaming of Core in 8.0. Can you double check your version of core matches the UI? Clearing the npm modules and package-lock to make sure we get fresh dependencies could also help. image

You can get the latest 8.1 core from here: https://nightly-pdftron.s3-us-west-2.amazonaws.com/stable/2021-10-06/webviewer/WebViewer-8.1.0_2021-10-06_stable.zip

michaelpeterlee commented 3 years ago

Thanks for your support @bollain, we don't get that far. I have cloned repo again, install and download-webviewer: image

bollain commented 3 years ago

Michael, I'm able to repro this issue. The problem is that we recently renamed our branches internally, and in the process we incorrectly pointed https://www.pdftron.com/downloads/WebViewer.zip to 7.3.3. Since the downloader uses this URL it is getting an older version of core.

Can you manually download 8.1 and copy the contents of core into the lib folder? That should resolve the issue. I've raised this problem with the team and we will resolve it ASAP.

michaelpeterlee commented 3 years ago

Replacing /core does not fix the issue. We are looking to upgrade asap, so hope it's on your radar in the near future.

bollain commented 3 years ago

Hi Michael, the issue with https://www.pdftron.com/downloads/WebViewer.zip has been fixed, it now should get you 8.1 when you run the download-webviewer script. Let me know if you re able to get the project running.

michaelpeterlee commented 3 years ago

Now working as per "Steps to reproduce". Thanks.