Node.js
Use this page when you need the concrete Node.js development setup for this repository.
What this environment is used for
The current repository is built around a Node.js workspace. This environment is used by:
packages/protocolpackages/clientpackages/serverapps/browser-simple-mdp-clientapps/chrome-extensionapps/vscode-extensiondocsscripts
Prepare Node.js
Use Node.js 20 or newer for local development. This repository builds Node-targeted output and depends on packages in the lockfile that require modern Node.js versions.
The simplest setup flow is:
- install Node.js
- enable
corepack - verify
nodeandpnpm - install workspace dependencies
Example:
bash
node -v
corepack enable
pnpm -vInstall dependencies
Use the repo root as your working directory, then install dependencies once:
bash
pnpm installThe repo declares pnpm@10.28.0 in packageManager, so prefer the corepack-managed pnpm version rather than mixing package managers.
Common root commands
bash
pnpm test:unit
pnpm build
pnpm test
pnpm docs:dev
pnpm docs:buildpnpm buildruns recursive workspace builds acrosspackages/**andapps/**.pnpm testreruns package builds before the smoke test so the dist-based end-to-end check uses fresh artifacts.pnpm docs:devandpnpm docs:buildautomatically build the browser bundles they copy intodocs/public/assets.
Additional root helpers:
bash
pnpm build:packages
pnpm build:apps
pnpm typecheck
pnpm typecheck:packages
pnpm typecheck:appsApp-scoped validation
When you are only touching one app, start with its own commands:
bash
pnpm --filter @modeldriveprotocol/browser-simple-mdp-client test
pnpm --filter @modeldriveprotocol/browser-simple-mdp-client build
pnpm --filter @modeldriveprotocol/chrome-extension typecheck
pnpm --filter @modeldriveprotocol/chrome-extension test
pnpm --filter @modeldriveprotocol/chrome-extension build
pnpm --filter @modeldriveprotocol/vscode-extension typecheck
pnpm --filter @modeldriveprotocol/vscode-extension test
pnpm --filter @modeldriveprotocol/vscode-extension build