GitHub user dosubot[bot] added a comment to the discussion: Upon deploying superset on k8s, UI is not being served (/app/superset-frontend directory has only package.json)
<!-- Answer --> The reason you can't run npm commands in the running container is that the official Superset production image doesn't include Node.js or npm—these are only present in the build stage to keep the final image slim. This means you can't build frontend assets at runtime in the container by default [reference](https://github.com/apache/superset/blob/93583220a7aa4debeaf3fd4a6cade9f771ee8c2f/Dockerfile). To fix your missing UI, you need to make sure the frontend assets are built during the Docker image creation phase, not after the container is running. If you're building your own image, double-check that the asset build step (usually via `docker/build-web.sh` or similar) runs before the image is finalized, and that `DEV_MODE` is not set to true [reference](https://github.com/apache/superset/issues/32898). If you want to build assets inside the container (not recommended for production), you’d need to modify your Dockerfile to install npm and Node.js in the final image, for example by adding: ``` RUN /app/docker/apt-install.sh build-essential python3 zstd npm ``` But the best practice is to build the assets as part of your image build, so the running container already has everything it needs [reference](https://github.com/apache/superset/issues/31714). If you need step-by-step help with the Docker build process or want to check your Dockerfile, let me know! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3ca4a924-6048-4c9f-92d2-9a8d222083ee?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/33840) GitHub link: https://github.com/apache/superset/discussions/33840#discussioncomment-13528473 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
