A development environment for Node.js projects. It provides a Node.js runtime built from source, manages package manager caches via persistent mounts, and exposes the V8 inspector for remote debugging.
A minimal workshop:
# workshop.yaml
name: node-app
base: ubuntu@24.04
sdks:
- name: node
channel: 22/stable
actions:
install: |
npm install
test: |
npm testThis demonstrates a basic Node.js workflow with persistent package caches.
-
No prerequisite SDKs are required.
-
Your Node.js project (with a
package.json) should be in your project directory:git clone <YOUR_REPO_URL>
-
On launch, the SDK configures
PATH, shell completions, and thenpmglobal prefix. No package installation happens automatically; you control when to runnpm installor equivalent via workshop actions or otherwise.
Once the workshop is ready:
workshop shell
npm install
npm run buildThe npm download cache is mapped from your host via the npm-cache mount plug
to the ~/.npm/_cacache directory inside the workshop.
Subsequent npm install runs are faster because they reuse cached packages
from the persistent mount.
To see where the packages are stored on the host:
workshop infoLaunch test and run commands from within the workshop, for example:
workshop shell
npm test
npm startUse npx to run locally installed binaries without global installation.
Corepack is enabled, so pnpm and yarn are available without additional
setup:
workshop shell
pnpm install
# or
yarn installBy default, pnpm uses /project/.pnpm-store as its content-addressable
store. To use the persistent pnpm-store mount instead (which may be slower):
pnpm config set storeDir ~/.local/share/pnpm/storeThe SDK exposes the V8 inspector via a tunnel slot on port 9229. To debug a
Node.js application remotely, start it with --inspect inside the workshop:
node --inspect your-app.jsThen connect the tunnel in Workshop and attach your debugger (for example, Chrome DevTools or VS Code) to the forwarded port on the host.
- Interface:
mount - Workshop target:
/home/workshop/.npm/_cacache - Purpose: Persists the
npmdownload cache between workshop updates.
- Interface:
mount - Workshop target:
/home/workshop/.cache/pnpm - Purpose: Persists
pnpmmetadata and cache files between workshop updates.
- Interface:
mount - Workshop target:
/home/workshop/.local/share/pnpm/store - Purpose: Provides a persistent content-addressable store for
pnpm.
- Interface:
mount - Workshop target:
/home/workshop/.cache/yarn - Purpose: Persists Yarn's download cache between workshop updates.
- Interface:
tunnel - Endpoint:
9229 - Purpose: Exposes the Node.js V8 inspector port for remote debugging on the host.
- Node.js official documentation
- npm documentation
- Corepack documentation
- pnpm documentation
- Yarn documentation
- Workshop documentation
- Node.js community: Node.js Discussions
- Workshop forum: Discourse
- Please review our Code of Conduct before participating.
All contributions, including code, documentation updates, and issue reports, are welcome!
- See
CONTRIBUTING.mdfor guidelines. - Open issues or pull requests on the official repository.
Copyright 2025 Canonical Ltd.
This SDK is licensed under the MIT License, the same license as Node.js.