Skip to content

Missing katex/remark-math/rehype-katex dependencies break studio build (500 on startup) #14

Description

@mnl-create

Bug

Commit 464e97f ("Fix #1: Render LaTeX math in chat messages using KaTeX (#6)") added imports of katex, remark-math, and rehype-katex to src/components/prompt-kit/markdown.tsx, but did not add them to dependencies in package.json (it only committed a package-lock.json, which the pnpm-based Docker build doesn't use — and which doesn't actually pin those packages either).

Reproduction

docker compose build hermes-studio
docker compose up -d
curl http://localhost:3000   # HTTP 500

Container logs show:

ERR_MODULE_NOT_FOUND
  at async eval (/app/src/components/prompt-kit/markdown.tsx:6:1)
  at async eval (/app/src/screens/chat/components/message-item.tsx:14:1)

Fix

Add the missing dependencies to package.json (verified working in the Docker image):

"katex": "^0.18.1",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0",

and regenerate pnpm-lock.yaml so the pnpm install layer in docker/workspace/Dockerfile installs them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions