> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# cimg/node

A Node Docker image built to run on CircleCI that contains node and yarn

***This image is designed to supercede the legacy CircleCI Node.js image, `circleci/node`.***

`cimg/node` is a Docker image created by CircleCI with continuous integration builds in mind.
Each tag contains a version of Node.js, `npm`, `yarn v1`, and any binaries and tools that are required for builds to complete successfully in a CircleCI environment.

## Getting Started

This image can be used with the CircleCI `docker` executor.
For example:

```yaml
jobs:
  build:
    docker:
      - image: cimg/node:26.3.1
    steps:
      - checkout
      - run: node --version
```

In the above example, the CircleCI Node.js Docker image is used for the primary container.
More specifically, the tag `26.3.1` is used meaning the version of Node.js will be Node.js v26.3.1.
You can now use Node.js within the steps for this job.

## How This Image Works

This image contains the Node.js programming language and its package managers.
This includes `npm` and `yarn`.

### Tagging Scheme

This image has the following tagging scheme:

```text
cimg/node:<node-version>
```

`<node-version>` - The version of Node.js to use.
This can be a full SemVer point release (such as `10.16.3`), or just the minor release (such as `12.6`), or a version alias.
This Node.js image has two version aliases, "current" and "lts".
This aliases will always point to the latest "current" and latest "lts" releases that Node.js has as according to [their website](https://nodejs.org/en/).
Keep in mind that using an alias tag will be less stable that specifying a full SemVer version.
If you use the minor release tag, it will automatically point to future patch updates as they are released by Node.js.
For example, the tag `12.6` points to Node.js v12.6.0 now, but when the next release comes out, it will point to Node.js v12.6.1.


## Image Tags


### Variants

Variant images typically contain the same base software, but with a few additional modifications.

#### Browsers

The browsers variant is the same Node.js image but with Java, Selenium, and browser dependencies pre-installed via apt.
The browsers variant can be used by appending `-browser` to the end of an existing `cimg/node` tag.
The browsers variant is designed to work in conjunction with the [CircleCI Browser Tools orb](https://circleci.com/developer/orbs/orb/circleci/browser-tools).
You can use the orb to install a version of Google Chrome and/or Firefox into your build. The image contains all of the supporting tools needed to use both the browser and its driver.

```yaml
orbs:
  browser-tools: circleci/browser-tools@1.1.0
jobs:
  build:
    docker:
      - image: cimg/node:15.0.1-browsers
    steps:
      - browser-tools/install-browser-tools
      - checkout
      - run: |
          node --version
          java --version
          google-chrome --version
```
