age-viewer
age-viewer copied to clipboard
AGE-Viewer front-end not building (backend seems fine)
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:
- Clone the age-viewer repo locally
- cd to the root of the source tree
- Issue command "npm run build-front "
- 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
(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?
OK. Fixed with some "aria-label" properties, reformatting and a few other things. Now builds without errors.
Maybe time to prepare a PR ...
@koalabi a PR would be much appreciated. I am trying to use this via Docker and have hit the same hurdle.
It is almost ready. I hope to finalize it tonight (i.e. in a few hours). Stay tuned ...
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
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)
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)