Skip to content

Build errors main.0630ae48.js is not found #287

Open
@acherla

Description

@acherla

Describe the bug
After building the application and deploying it main.0630ae48.js is not found under /usr/share/nginx/html/static/

image

To Reproduce
Steps to reproduce the behavior:

  1. Build application using makefile
  2. deploy docker image
  3. Try to access the homepage

Expected behavior
Should be able to find the appropriate build files after the npm run build command

Version
Latest master branch

Environment
Include information like the docker command that was run, OS it is running on and other environment details.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Root cause appears to be a misconfiguration in the Dockerfile build copy command for the client/api image where its only copying from the base llmstack/client/static directory rather than from the output build directory. This results in missing css/js/media files when building the image.

The build process is not even configured to properly merge the llmstack/client/static directory with the llmstack/client/build/static output directory.

Generally speaking I highly doubt the base build instructions for the application actually work out of the box. It appears the e2e build really only works for the promptly development team due to how their development environment is setup. Would be a good idea to document the required setup as the makefile/dockerfile's are incorrectly configured as the standard npm install && npm build commands in the makefile do not properly build the correct static file directory.

This results in the above errors as the output build files are not even copied to to the client image to serve the correct static content to a client.

Infact just looking at the code for the Dockerfile/api and Dockerfile/app files

Dockerfile/api

# Copy application code
COPY --from=builder /code/llmstack/client/build/index.html /code/llmstack/client/build/index.html
COPY --from=builder /code/llmstack/client/build/static /code/llmstack/client/build/static
COPY --from=builder /code/llmstack/static /code/llmstack/static

Dockerfile/app

FROM <image-registry>:${TAG:-main} AS builder

# Copy static files from Django to nginx
COPY --from=builder /code/llmstack/static /usr/share/nginx/html/static

In the above code block the app image literally doesn't even copy any files from the output build directory from the initial api image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions