mise run dev Fix: MCP node_modules Pruning
#
We shipped a fix for a bug where tofu-internal-mcp/tofu-external-mcp containers would prune the host’s shared node_modules, intermittently breaking mise run dev’s codegen step with errors like tsx: not found or orval: not found. See ENG-6855 for the full writeup. The tofu-external-mcp volumes were later renamed from external_mcp_* to tofu_external_mcp_* for naming consistency (ENG-6913).
This is a Docker volume change, so if your workspace already ran mise run dev before these fixes landed, run the commands below once to clean up.
If mise run dev breaks for you after pulling this
#
Run these commands in order (each is safe to run even if there’s nothing to clean up):
# 1. Stop the affected containers
docker compose rm -sf tofu-external-mcp webapp
# 2. Remove any container still holding a node_modules volume, current or pre-rename
# (handles "no such service: tofu-external-mcp" too — that means your checked-out
# docker-compose.yml doesn't define the service, but a container from a different
# checkout is still running and holding the volume, so compose can't find it by name)
for v in $(docker volume ls --format '{{.Name}}' | grep -E '^bonsai_(tofu_)?external_mcp_'); do
docker ps -a --filter "volume=$v" --format '{{.ID}}' | xargs -r docker rm -f
done
# 3. Remove the volumes themselves, current name and pre-ENG-6913 name
docker volume ls --format '{{.Name}}' | grep -E '^bonsai_(tofu_)?external_mcp_' | xargs -r docker volume rm
# 4. Run dev again
mise run dev
If step 3 still reports “volume is in use”, something re-created a container in between — re-run step 2 then step 3.
If you still have issues #
Message Deepanshu on #eng-general (or reply in the original Slack thread) with the exact error from your terminal.