Node.js
The Node.js JavaScript runtime through nvm, with node, npm and npx for running code and installing packages.
Usage
{
"features": {
"ghcr.io/hansehart/devcontainer-features/node:5": {}
}
}Version 5.2.0, see the changelog for what changed.
Options
| Option | Default | Description |
|---|---|---|
version | lts | Channel (lts|latest), a release line (major or major.minor), or an exact version (major.minor.patch). |
stateDir | If 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. | |
nvmVersion | latest | nvm channel (latest) or an exact version (major.minor.patch). |
Customizations
Open Secure Software Suite
The hosts the tool reaches:
| Host | Ports | Secret | For |
|---|---|---|---|
nodejs.org | 443 | Node versions nvm installs | |
registry.npmjs.org | 443 | Packages npm installs |
The variables that set its defaults:
| Variable | Value | For |
|---|---|---|
NPM_CONFIG_IGNORE_SCRIPTS | true | With true, dependency install scripts run on explicit request |
NPM_CONFIG_CACHE | ${stateDir}/cache | npm's cache in the state dir |
NPM_CONFIG_USERCONFIG | ${stateDir}/npmrc | npm's user config in the state dir |
The config files it reads:
| File | Path | For |
|---|---|---|
npmrc | ${stateDir}/npmrc | The package manager's rules and registries |