Skip to Content
ASE

Node.js

The Node.js JavaScript runtime through nvm, with node, npm and npx for running code and installing packages.

Usage

.devcontainer/devcontainer.json
{
  "features": {
    "ghcr.io/hansehart/devcontainer-features/node:5": {}
  }
}

Version 5.2.0, see the changelog for what changed.

Options

OptionDefaultDescription
versionltsChannel (lts|latest), a release line (major or major.minor), or an exact version (major.minor.patch).
stateDirIf set, puts this feature's data at this path, which must be inside the remote user's home. Mount a volume there to persist it across rebuilds.
nvmVersionlatestnvm channel (latest) or an exact version (major.minor.patch).

Customizations

Open Secure Software Suite

The hosts the tool reaches:

HostPortsSecretFor
nodejs.org443Node versions nvm installs
registry.npmjs.org443Packages npm installs

The variables that set its defaults:

VariableValueFor
NPM_CONFIG_IGNORE_SCRIPTStrueWith true, dependency install scripts run on explicit request
NPM_CONFIG_CACHE${stateDir}/cachenpm's cache in the state dir
NPM_CONFIG_USERCONFIG${stateDir}/npmrcnpm's user config in the state dir

The config files it reads:

FilePathFor
npmrc${stateDir}/npmrcThe package manager's rules and registries

On this page