From fbbd869ff23f9bba0a6cb9b7b7b5e1d9e43e8dc6 Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 13 May 2026 16:02:49 -0700 Subject: [PATCH 1/9] build(bootstrap): use mise to manage Node.js and pnpm (ASTD-148) Bootstrap previously assumed Node.js and pnpm were already on PATH. Replace the `verify-pnpm` / `verify-node-version` shell-check path with a `verify-mise` target that installs mise (if absent) and resolves `node@22` / `pnpm@10` from a new `mise.toml`. Subsequent bootstrap steps invoke node and pnpm via `mise exec --` so they pick up the mise-managed versions regardless of what the caller already has on PATH. `mise trust --all --silent` runs before `mise install --yes` so the target is non-interactive in CI and on fresh developer machines. Signed-off-by: mschwab --- Makefile | 45 +++++++++++++++++++++++++++++++++++++++++---- mise.toml | 3 +++ 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 mise.toml diff --git a/Makefile b/Makefile index e8433caea3..351a712232 100644 --- a/Makefile +++ b/Makefile @@ -195,18 +195,55 @@ bootstrap-python: ## Bootstrap Python dependencies. $(BOOTSTRAP_ACTIVATION_REMINDER); \ fi +MISE := $(shell command -v mise 2>/dev/null || echo $(HOME)/.local/bin/mise) +MISE_EXEC := $(MISE) exec -- + +.PHONY: verify-mise +verify-mise: ## Install mise (if missing) and run `mise install` from mise.toml + @if [ ! -x "$(MISE)" ] && ! command -v mise >/dev/null 2>&1; then \ + curl -fsSL https://mise.run | sh; \ + fi + @if [ ! -x "$(MISE)" ] && ! command -v mise >/dev/null 2>&1; then \ + echo "mise not on PATH. Add $$HOME/.local/bin to PATH and re-run."; \ + exit 1; \ + fi + $(MISE) trust --all --silent + $(MISE) install --yes + @$(MAKE) --no-print-directory setup-mise-shell + +.PHONY: setup-mise-shell +setup-mise-shell: ## Append `mise activate` to shell rc (idempotent; skipped in CI) + @if [ "$$CI" = "true" ]; then exit 0; fi; \ + shell_name=$$(basename "$$SHELL"); \ + case "$$shell_name" in \ + zsh) rc="$$HOME/.zshrc"; line='eval "$$(mise activate zsh)"';; \ + bash) rc="$$HOME/.bashrc"; line='eval "$$(mise activate bash)"';; \ + fish) rc="$$HOME/.config/fish/config.fish"; line='mise activate fish | source';; \ + *) echo "Unknown shell '$$shell_name'; activate mise manually."; exit 0;; \ + esac; \ + mkdir -p "$$(dirname "$$rc")"; \ + touch "$$rc"; \ + if ! grep -Fq "$$line" "$$rc"; then \ + printf '\n%s\n' "$$line" >> "$$rc"; \ + echo "Appended mise activation to $$rc. Run: $$line"; \ + fi + +.PHONY: verify-pnpm +verify-pnpm: verify-mise ## Verify pnpm is available for Studio bootstrap + @$(MISE_EXEC) pnpm --version + .PHONY: verify-node-version -verify-node-version: ## Verify pnpm and Node.js satisfy Studio's package engine +verify-node-version: verify-pnpm ## Verify pnpm and Node.js satisfy Studio's package engine @echo "~~~~~~" @echo "verifying Node.js version from web/package.json engines" - @script/verify-node-version.sh + @$(MISE_EXEC) script/verify-node-version.sh .PHONY: bootstrap-studio bootstrap-studio: verify-node-version ## Install web dependencies and build Studio assets for FastAPI @echo "~~~~~~" @echo "installing Studio web dependencies and building FastAPI assets" - cd web && CI=true pnpm install --frozen-lockfile - cd web && pnpm --filter nemo-studio-ui build:fastapi + cd web && CI=true $(MISE_EXEC) pnpm install --frozen-lockfile + cd web && $(MISE_EXEC) pnpm --filter nemo-studio-ui build:fastapi .PHONY: bootstrap-plugins bootstrap-plugins: .venv ## Install editable plugin packages not covered by the root uv workspace diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000000..cb1235f752 --- /dev/null +++ b/mise.toml @@ -0,0 +1,3 @@ +[tools] +node = "22" +pnpm = "10" From e2397a69b652a34d8918d65d347bd8975e038863 Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 13 May 2026 16:20:45 -0700 Subject: [PATCH 2/9] build(bootstrap): route update-web-sdk through mise, drop shell-rc mutation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `make update-web-sdk` previously called `cd web && pnpm gen` and assumed pnpm was on PATH — same fresh-checkout gap this branch fixes for the Studio bootstrap path. Make it depend on `verify-mise` and run pnpm via `$(MISE_EXEC)`. Also drop the `setup-mise-shell` target that appended `mise activate` to the developer's shell rc. It's invasive for what's only needed when a dev wants direnv-style auto-activation; the bootstrap and pre-commit paths already route through `mise exec --`, and `mise` itself prints the activation hint after its own installer runs. Signed-off-by: mschwab --- Makefile | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 351a712232..76e5859ad7 100644 --- a/Makefile +++ b/Makefile @@ -67,8 +67,8 @@ stainless: ## Run Stainless to generate the OpenAPI spec and sync it with the SD SDK_RELEASE_TIER=ga ./sdk/stainless.sh sync .PHONY: update-web-sdk -update-web-sdk: ## Regenerate the TypeScript web SDK (web/packages/sdk) from the OpenAPI spec via Orval - cd web && pnpm gen +update-web-sdk: verify-mise ## Regenerate the TypeScript web SDK (web/packages/sdk) from the OpenAPI spec via Orval + cd web && $(MISE_EXEC) pnpm gen .PHONY: update-sdk update-sdk: build-policy refresh-openapi stainless update-web-sdk update-cli ## Update the SDK by regenerating the OpenAPI spec and syncing it with Stainless @@ -209,24 +209,6 @@ verify-mise: ## Install mise (if missing) and run `mise install` from mise.toml fi $(MISE) trust --all --silent $(MISE) install --yes - @$(MAKE) --no-print-directory setup-mise-shell - -.PHONY: setup-mise-shell -setup-mise-shell: ## Append `mise activate` to shell rc (idempotent; skipped in CI) - @if [ "$$CI" = "true" ]; then exit 0; fi; \ - shell_name=$$(basename "$$SHELL"); \ - case "$$shell_name" in \ - zsh) rc="$$HOME/.zshrc"; line='eval "$$(mise activate zsh)"';; \ - bash) rc="$$HOME/.bashrc"; line='eval "$$(mise activate bash)"';; \ - fish) rc="$$HOME/.config/fish/config.fish"; line='mise activate fish | source';; \ - *) echo "Unknown shell '$$shell_name'; activate mise manually."; exit 0;; \ - esac; \ - mkdir -p "$$(dirname "$$rc")"; \ - touch "$$rc"; \ - if ! grep -Fq "$$line" "$$rc"; then \ - printf '\n%s\n' "$$line" >> "$$rc"; \ - echo "Appended mise activation to $$rc. Run: $$line"; \ - fi .PHONY: verify-pnpm verify-pnpm: verify-mise ## Verify pnpm is available for Studio bootstrap From 13ee02f43a16dca4019239a6cae9348daa3adcfe Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 5 Aug 2026 14:27:23 -0700 Subject: [PATCH 3/9] build(bootstrap): drop unreachable toolchain fallbacks from verify-node-version The script now runs under `mise exec --`, so node and pnpm are always present. The corepack-enable fallback and the separate missing-binary branches can never fire. Replace them with one guard that points at `make verify-node-version` for the case where someone runs the script directly, outside the mise-managed PATH. Signed-off-by: mschwab --- script/verify-node-version.sh | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/script/verify-node-version.sh b/script/verify-node-version.sh index 21d074a8a4..c8febeedad 100755 --- a/script/verify-node-version.sh +++ b/script/verify-node-version.sh @@ -5,25 +5,16 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" WEB_DIR="$REPO_ROOT/web" -# --- pnpm availability --- - -if ! command -v pnpm >/dev/null 2>&1; then - if command -v corepack >/dev/null 2>&1; then - corepack enable pnpm - else - echo "pnpm is required for Studio bootstrap." - echo "Install pnpm and put it first on PATH." +# --- Toolchain availability --- + +for tool in node pnpm; do + if ! command -v "$tool" >/dev/null 2>&1; then + echo "$tool is not on PATH." + echo "This script expects the mise-managed toolchain. Run:" + echo " make verify-node-version" exit 1 fi -fi - -# --- Node.js availability --- - -if ! command -v node >/dev/null 2>&1; then - echo "Node.js is required for Studio bootstrap." - echo "Install a matching local Node.js and put it first on PATH." - exit 1 -fi +done # --- Engine compatibility check --- From 0215b07dc01d691e71e517aa3a5fc857a85e46a7 Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 5 Aug 2026 19:05:23 -0700 Subject: [PATCH 4/9] build(bootstrap): pin mise installer, drop trust --all, add opt-out `mise trust --all` walked ancestor directories as well as the repo, so it silently trusted any mise config above the checkout. It was also never needed: a mise.toml holding only [tools] is trust-exempt, and `mise install` runs clean without it. Pin the installer with MISE_VERSION so `make bootstrap` can't pull an arbitrary release off mise.run, and add NMP_SKIP_MISE=1 for bootstrapping against a toolchain that is already on PATH (offline installs, nix shells, distro packages). web/package.json engines are enforced either way. Also drop the stale `pnpm env use --global` advice from the bootstrap failure message and document the mise workflow in SETUP.md, including that direct `pnpm` use in web/ needs `mise exec --` or `mise activate`. Signed-off-by: mschwab --- Makefile | 28 ++++++++++++++++++---------- SETUP.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 76e5859ad7..140ba08870 100644 --- a/Makefile +++ b/Makefile @@ -195,19 +195,28 @@ bootstrap-python: ## Bootstrap Python dependencies. $(BOOTSTRAP_ACTIVATION_REMINDER); \ fi +# Set NMP_SKIP_MISE=1 to bootstrap against the node/pnpm already on PATH +# instead of the mise-managed ones (offline installs, nix shells, distro +# toolchains). web/package.json engines are still enforced either way. +NMP_SKIP_MISE ?= +MISE_VERSION ?= v2026.5.7 MISE := $(shell command -v mise 2>/dev/null || echo $(HOME)/.local/bin/mise) -MISE_EXEC := $(MISE) exec -- +MISE_EXEC := $(if $(NMP_SKIP_MISE),,$(MISE) exec --) .PHONY: verify-mise verify-mise: ## Install mise (if missing) and run `mise install` from mise.toml - @if [ ! -x "$(MISE)" ] && ! command -v mise >/dev/null 2>&1; then \ - curl -fsSL https://mise.run | sh; \ - fi - @if [ ! -x "$(MISE)" ] && ! command -v mise >/dev/null 2>&1; then \ - echo "mise not on PATH. Add $$HOME/.local/bin to PATH and re-run."; \ + @if [ -n "$(NMP_SKIP_MISE)" ]; then \ + echo "NMP_SKIP_MISE set, using node/pnpm from PATH"; \ + exit 0; \ + fi; \ + if [ ! -x "$(MISE)" ] && ! command -v mise >/dev/null 2>&1; then \ + curl -fsSL https://mise.run | MISE_VERSION=$(MISE_VERSION) sh; \ + fi; \ + if [ ! -x "$(MISE)" ] && ! command -v mise >/dev/null 2>&1; then \ + echo "mise not on PATH. Add $$HOME/.local/bin to PATH and re-run,"; \ + echo "or re-run with NMP_SKIP_MISE=1 to use your own node/pnpm."; \ exit 1; \ - fi - $(MISE) trust --all --silent + fi; \ $(MISE) install --yes .PHONY: verify-pnpm @@ -251,8 +260,7 @@ bootstrap: bootstrap-python ## Bootstrap the local dev environment, including St echo ""; \ echo "warning: optional Studio asset bootstrap did not complete."; \ echo "Studio will be unavailable at http://localhost:8080/studio/ until assets are built."; \ - echo "Install Node.js matching web/package.json with pnpm, then rerun:"; \ - echo " pnpm env use --global 22.23.2"; \ + echo "Check the output above, then rerun:"; \ echo " make bootstrap-studio"; \ fi @echo "bootstrap completed" diff --git a/SETUP.md b/SETUP.md index aa6dd27107..0a6814ca14 100644 --- a/SETUP.md +++ b/SETUP.md @@ -95,6 +95,24 @@ nemo setup --auto --start-services --install-skills --deploy-agent `make clean` removes the venv; `make clean-python` is the venv-only variant. +### Node.js and pnpm + +`mise.toml` pins the Node.js and pnpm versions that satisfy `web/package.json` engines, and `make bootstrap-studio` installs mise on first run and invokes both through `mise exec --`. Nothing is written to your shell rc. + +That covers the `make` targets only. To run `pnpm` directly in `web/` — the Studio dev server, tests, lint — either prefix it: + +```bash +mise exec -- pnpm dev +``` + +or activate mise once so every shell picks up the pinned versions: + +```bash +eval "$(mise activate zsh)" # add to ~/.zshrc; bash and fish are also supported +``` + +Without one of those, a system or nvm-managed Node.js takes precedence and may not satisfy `engines`. To bootstrap against your own toolchain instead of mise, use `make bootstrap-studio NMP_SKIP_MISE=1`. + If `nemo setup` is too high-level for the task (e.g. debugging startup, custom service set, custom plugin install after bootstrap), use the manual sections below. ### Default model selection (under `--auto`) From d6817b54164b023b8e5e814428d879399840e23b Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 5 Aug 2026 19:34:32 -0700 Subject: [PATCH 5/9] build(bootstrap): give verify-pnpm an actionable error when pnpm is missing With NMP_SKIP_MISE=1 on a machine without pnpm, verify-pnpm failed with make's bare `Error 127`. The guidance in verify-node-version.sh never printed because verify-pnpm runs first. Catch the failure and say which of the two toolchain paths is in play. Signed-off-by: mschwab --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 140ba08870..07e7cf4973 100644 --- a/Makefile +++ b/Makefile @@ -221,7 +221,16 @@ verify-mise: ## Install mise (if missing) and run `mise install` from mise.toml .PHONY: verify-pnpm verify-pnpm: verify-mise ## Verify pnpm is available for Studio bootstrap - @$(MISE_EXEC) pnpm --version + @$(MISE_EXEC) pnpm --version || { \ + echo "pnpm not found."; \ + if [ -n "$(NMP_SKIP_MISE)" ]; then \ + echo "NMP_SKIP_MISE is set, so pnpm has to come from your PATH."; \ + echo "Install pnpm, or re-run without NMP_SKIP_MISE to use the mise-managed one."; \ + else \ + echo "Run 'make verify-mise' to install the pinned toolchain."; \ + fi; \ + exit 1; \ + } .PHONY: verify-node-version verify-node-version: verify-pnpm ## Verify pnpm and Node.js satisfy Studio's package engine From 6326efe5bdf492d77894ec9cc4bde5c83b2119a2 Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 5 Aug 2026 21:00:44 -0700 Subject: [PATCH 6/9] docs(bootstrap): describe the mise-managed Node.js and pnpm flow web/README.md still told developers to install Node.js 22 from nodejs.org and `npm install -g pnpm`. Replace that with the two supported options: let mise manage the versions pinned in mise.toml, or install node and pnpm yourself. Note that the make targets use the mise-managed versions either way, and fix the `pnpm dev` working directory to match web/AGENTS.md. Also drop the stale "upgrade Node on the VM" advice from the Cursor Cloud notes and point agents at mise from web/AGENTS.md. Signed-off-by: mschwab --- AGENTS.md | 2 +- SETUP.md | 3 ++- web/AGENTS.md | 1 + web/README.md | 21 +++++++++++++++++---- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7832f70f8e..3272a1c3c8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -248,7 +248,7 @@ Ensure all pre-commit hooks pass by running `uv run pre-commit run -a`. A clean - **uv version pin:** Root `pyproject.toml` requires `uv>=0.9.14,<0.10.0`. Newer uv releases (e.g. 0.11.x) fail `uv sync` with a version mismatch. Install the pinned range before bootstrapping: `pip install 'uv>=0.9.14,<0.10.0'`. - **Native build deps:** `make bootstrap-python` builds `annoy` (via `nemoguardrails`). Install system headers once per VM image: `sudo apt-get install -y python3-dev build-essential`. - **Python bootstrap:** Run `make bootstrap-python` from repo root (creates `.venv`, runs `uv sync --frozen --all-packages`). See [SETUP.md](SETUP.md) for the full playbook. -- **Studio (optional):** `make bootstrap-studio` requires Node **22.23.x** and pnpm per `web/package.json` engines. The VM may ship an older Node (e.g. 22.14); API services still run without Studio assets. Upgrade Node then run `make bootstrap-studio` if you need `http://localhost:8080/studio/`. +- **Studio (optional):** `make bootstrap-studio` installs mise and resolves the Node.js/pnpm versions pinned in `mise.toml`, so a VM shipping an older Node doesn't need upgrading. API services still run without Studio assets. Pass `NMP_SKIP_MISE=1` to bootstrap against the toolchain already on PATH. ### Running the platform diff --git a/SETUP.md b/SETUP.md index 0a6814ca14..54f6e5a4b8 100644 --- a/SETUP.md +++ b/SETUP.md @@ -108,7 +108,8 @@ mise exec -- pnpm dev or activate mise once so every shell picks up the pinned versions: ```bash -eval "$(mise activate zsh)" # add to ~/.zshrc; bash and fish are also supported +eval "$(mise activate bash)" # ~/.bashrc +eval "$(mise activate zsh)" # ~/.zshrc ``` Without one of those, a system or nvm-managed Node.js takes precedence and may not satisfy `engines`. To bootstrap against your own toolchain instead of mise, use `make bootstrap-studio NMP_SKIP_MISE=1`. diff --git a/web/AGENTS.md b/web/AGENTS.md index dc64049144..efa58c2589 100644 --- a/web/AGENTS.md +++ b/web/AGENTS.md @@ -32,6 +32,7 @@ Cursor/Claude skills for this monorepo live under **`web/.agents/skills/`** (for - Use **pnpm** exclusively — never npm or yarn - Run frontend commands from `web/`, not from repo root +- Node.js and pnpm come from mise (`mise.toml` at the repo root). If mise isn't activated in the shell, prefix commands with `mise exec --`, or run `make verify-mise` from the repo root to install the pinned versions - Install dependencies: `pnpm add ` - Run scripts: `pnpm ` diff --git a/web/README.md b/web/README.md index 8d48fdb4d2..87d0015527 100644 --- a/web/README.md +++ b/web/README.md @@ -4,11 +4,24 @@ NeMo Studio is a UI built on the NeMo Platform, which is aimed at improving agen ## Getting Started -1. Install the latest [Node.js 22](https://nodejs.org/en/download) (LTS). -2. Install pnpm, install workspace deps, and copy `.env` files: +1. Get Node.js and pnpm satisfying the `engines` in `package.json` onto your PATH. Either let [mise](https://mise.jdx.dev/) manage them from the versions pinned in `mise.toml` at the repo root: + + ```bash + make verify-mise # from the repo root, installs mise + the pinned versions + ``` + + then add the matching line for your shell to its startup file: + + ```bash + eval "$(mise activate bash)" # ~/.bashrc + eval "$(mise activate zsh)" # ~/.zshrc + ``` + + or install Node.js and pnpm yourself. `make bootstrap-studio` and the other `make` targets always use the mise-managed versions regardless of what you pick here. + +2. Install workspace deps and copy `.env` files, from `web/`: ```bash - npm install -g pnpm pnpm install cp packages/studio/env/.env.dev.local.sample packages/studio/env/.env.dev.local && \ cp packages/studio/env/.env.e2e packages/studio/env/.env.e2e.local @@ -16,7 +29,7 @@ NeMo Studio is a UI built on the NeMo Platform, which is aimed at improving agen ## Running Studio Locally -Run the following script from the root of the repo: +Run the following script from `web/`: ```bash pnpm dev From 4814ccb444cb4f88420fa8186b099100dc963a39 Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 5 Aug 2026 21:18:15 -0700 Subject: [PATCH 7/9] build(bootstrap): pin node exactly in mise.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `node = "22"` resolved to whatever the latest 22.x was at install time, so two developers bootstrapping months apart could land on different patches. web/package.json constrains node on both ends (`>=22.23.2 <23`), so pin it to the same 22.23.2 that .nvmrc already names. pnpm stays fuzzy — engines only sets a floor for it. Signed-off-by: mschwab --- mise.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mise.toml b/mise.toml index cb1235f752..fd864b972c 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,3 @@ [tools] -node = "22" +node = "22.23.2" pnpm = "10" From c33e867226b67eea613d2a9b978b9ad72581b220 Mon Sep 17 00:00:00 2001 From: mschwab Date: Thu, 6 Aug 2026 00:35:15 -0700 Subject: [PATCH 8/9] build(bootstrap): pin pnpm to a minor, fix PATH and bypass docs Review follow-ups: - Pin pnpm to 10.34 so the package manager can't drift across a minor while still picking up patch releases. node stays exact because web/package.json constrains it on both ends. - mise installs to ~/.local/bin, which isn't on PATH by default on macOS, so `mise activate` and `mise exec` fail on a fresh shell. Say so in web/README.md, SETUP.md, and web/AGENTS.md. - verify-node-version.sh told users to run `make verify-node-version` when a tool was missing, which is the target that just failed, and it claimed a mise-managed toolchain even under NMP_SKIP_MISE=1. Branch on the bypass and point at `make verify-mise` otherwise. - web/README.md said the make targets "always" use mise-managed versions, contradicting NMP_SKIP_MISE=1. Signed-off-by: mschwab --- SETUP.md | 8 +++++++- mise.toml | 2 +- script/verify-node-version.sh | 8 ++++++-- web/AGENTS.md | 2 +- web/README.md | 6 ++++-- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/SETUP.md b/SETUP.md index 54f6e5a4b8..6b728dc041 100644 --- a/SETUP.md +++ b/SETUP.md @@ -99,7 +99,13 @@ nemo setup --auto --start-services --install-skills --deploy-agent `mise.toml` pins the Node.js and pnpm versions that satisfy `web/package.json` engines, and `make bootstrap-studio` installs mise on first run and invokes both through `mise exec --`. Nothing is written to your shell rc. -That covers the `make` targets only. To run `pnpm` directly in `web/` — the Studio dev server, tests, lint — either prefix it: +That covers the `make` targets only. To run `pnpm` directly in `web/` — the Studio dev server, tests, lint — you need mise on your PATH first, since it installs to `~/.local/bin`: + +```bash +export PATH="$HOME/.local/bin:$PATH" +``` + +Then either prefix commands: ```bash mise exec -- pnpm dev diff --git a/mise.toml b/mise.toml index fd864b972c..724c599309 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,3 @@ [tools] node = "22.23.2" -pnpm = "10" +pnpm = "10.34" diff --git a/script/verify-node-version.sh b/script/verify-node-version.sh index c8febeedad..e293e066b3 100755 --- a/script/verify-node-version.sh +++ b/script/verify-node-version.sh @@ -10,8 +10,12 @@ WEB_DIR="$REPO_ROOT/web" for tool in node pnpm; do if ! command -v "$tool" >/dev/null 2>&1; then echo "$tool is not on PATH." - echo "This script expects the mise-managed toolchain. Run:" - echo " make verify-node-version" + if [ -n "${NMP_SKIP_MISE:-}" ]; then + echo "NMP_SKIP_MISE is set, so $tool has to come from your PATH." + echo "Install it, or re-run without NMP_SKIP_MISE to use the mise-managed one." + else + echo "Run 'make verify-mise' to install the pinned toolchain." + fi exit 1 fi done diff --git a/web/AGENTS.md b/web/AGENTS.md index efa58c2589..11b8c4ca09 100644 --- a/web/AGENTS.md +++ b/web/AGENTS.md @@ -32,7 +32,7 @@ Cursor/Claude skills for this monorepo live under **`web/.agents/skills/`** (for - Use **pnpm** exclusively — never npm or yarn - Run frontend commands from `web/`, not from repo root -- Node.js and pnpm come from mise (`mise.toml` at the repo root). If mise isn't activated in the shell, prefix commands with `mise exec --`, or run `make verify-mise` from the repo root to install the pinned versions +- Node.js and pnpm come from mise (`mise.toml` at the repo root). Run `make verify-mise` from the repo root to install the pinned versions; mise lands in `~/.local/bin`, so use `~/.local/bin/mise exec -- ` if that directory isn't on PATH and mise isn't activated in the shell - Install dependencies: `pnpm add ` - Run scripts: `pnpm ` diff --git a/web/README.md b/web/README.md index 87d0015527..dc54d2336c 100644 --- a/web/README.md +++ b/web/README.md @@ -10,14 +10,16 @@ NeMo Studio is a UI built on the NeMo Platform, which is aimed at improving agen make verify-mise # from the repo root, installs mise + the pinned versions ``` - then add the matching line for your shell to its startup file: + mise installs to `~/.local/bin`, so make sure that's on your PATH, then add the matching line for your shell to its startup file: ```bash + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" # ~/.bashrc eval "$(mise activate zsh)" # ~/.zshrc ``` - or install Node.js and pnpm yourself. `make bootstrap-studio` and the other `make` targets always use the mise-managed versions regardless of what you pick here. + or install Node.js and pnpm yourself. `make bootstrap-studio` and the other `make` targets use the mise-managed versions by default, whatever you pick here — pass `NMP_SKIP_MISE=1` to make them use your PATH instead. 2. Install workspace deps and copy `.env` files, from `web/`: From 25aa639297905e69b90d759592043651e6c990cb Mon Sep 17 00:00:00 2001 From: mschwab Date: Thu, 6 Aug 2026 01:11:58 -0700 Subject: [PATCH 9/9] build(bootstrap): quote the mise path in Makefile invocations MISE resolves to `command -v mise` or $HOME/.local/bin/mise, either of which can contain spaces. The existence guards already quoted it, but the two invocation sites did not, so a home directory with a space split the path into separate shell words and bootstrap failed with a misleading "No such file or directory". Signed-off-by: mschwab --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 07e7cf4973..4821cac8d9 100644 --- a/Makefile +++ b/Makefile @@ -201,7 +201,7 @@ bootstrap-python: ## Bootstrap Python dependencies. NMP_SKIP_MISE ?= MISE_VERSION ?= v2026.5.7 MISE := $(shell command -v mise 2>/dev/null || echo $(HOME)/.local/bin/mise) -MISE_EXEC := $(if $(NMP_SKIP_MISE),,$(MISE) exec --) +MISE_EXEC := $(if $(NMP_SKIP_MISE),,"$(MISE)" exec --) .PHONY: verify-mise verify-mise: ## Install mise (if missing) and run `mise install` from mise.toml @@ -217,7 +217,7 @@ verify-mise: ## Install mise (if missing) and run `mise install` from mise.toml echo "or re-run with NMP_SKIP_MISE=1 to use your own node/pnpm."; \ exit 1; \ fi; \ - $(MISE) install --yes + "$(MISE)" install --yes .PHONY: verify-pnpm verify-pnpm: verify-mise ## Verify pnpm is available for Studio bootstrap