age-viewer icon indicating copy to clipboard operation
age-viewer copied to clipboard

AGE-Viewer front-end not building (backend seems fine)

Open koalabi opened this issue 1 year ago • 7 comments

Describe the bug When following the build instructions from README .md, the front-end build aborts on erros (after having issued many warnings when getting the dependencies). Backend seems to build fine.

To Reproduce Steps to reproduce the behavior:

  1. Clone the age-viewer repo locally
  2. cd to the root of the source tree
  3. Issue command "npm run build-front "
  4. See error (build aborts on a series of errors related to jsx - see attachment and excerpt below:
Failed to compile.

src/components/contents/presentations/Editor.jsx
  Line 163:15:  A control must be associated with a text label  jsx-a11y/control-has-associated-label
  ...

Expected behavior Successful build was expected, possibly with some warnings

Screenshots No screenshots needed but log file is attached.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Browser: (not relevant)
  • Versions : npm : 7.24.0, node: v16.10.0

Additional context Nothing to add age-viewer-fend-build-errors.txt

koalabi avatar Feb 08 '24 18:02 koalabi

(I'm not familiar with JSX)

Problem can be fixed by adding some text as button labels but the parser/checker seems to be really finicky: it even considers   as a void string (i.e. as the absence of labels). Putting "" is not sufficient either (the string appears on the button) but the front-end builds (but not necessarily runs). Adding a non-empty string works but leaves visible (and not desired) traces.

Any recommendation from a JSX expert?

koalabi avatar Feb 08 '24 19:02 koalabi

OK. Fixed with some "aria-label" properties, reformatting and a few other things. Now builds without errors.

Maybe time to prepare a PR ...

koalabi avatar Feb 08 '24 20:02 koalabi

@koalabi a PR would be much appreciated. I am trying to use this via Docker and have hit the same hurdle.

BennyH26 avatar Feb 14 '24 14:02 BennyH26

It is almost ready. I hope to finalize it tonight (i.e. in a few hours). Stay tuned ...

koalabi avatar Feb 14 '24 15:02 koalabi

Thank you!

On Wed, Feb 14, 2024 at 10:05 AM koalabi @.***> wrote:

It is almost ready. I hope to finalize it tonight (i.e. in a few hours). Stay tuned ...

— Reply to this email directly, view it on GitHub https://github.com/apache/age-viewer/issues/168#issuecomment-1944019825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXAYUYH7CAH36D5GL3ANDYTTHDZAVCNFSM6AAAAABDAH4SIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGAYTSOBSGU . You are receiving this because you commented.Message ID: @.***>

-- Ben Hakim, MD

BennyH26 avatar Feb 14 '24 15:02 BennyH26

Ahead of the pull request, a patch file that fix the build errors.

NOTE: by default, as per the source tree, the DEV server only accepts connection from localhost. Any attempt to access remotely will end up in error: "Invalid Host Header" (see StackOverflow for details)

age-viewer.patch.txt

koalabi avatar Feb 14 '24 20:02 koalabi

Thank you! On Wed, Feb 14, 2024 at 10:05 AM koalabi @.> wrote: It is almost ready. I hope to finalize it tonight (i.e. in a few hours). Stay tuned ... — Reply to this email directly, view it on GitHub <#168 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXAYUYH7CAH36D5GL3ANDYTTHDZAVCNFSM6AAAAABDAH4SIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGAYTSOBSGU . You are receiving this because you commented.Message ID: @.> -- Ben Hakim, MD

Hi, Benny, see patch file above, as an interim solution while I finalize the PR ...

By the way ;-), if you produce your Docker image, I would be interested in the Dockerfile ;-) (with access from remote hosts allowed)

koalabi avatar Feb 14 '24 21:02 koalabi