# Node > Install, lint and test NodeJS modules ## Getting Started Include the following in `.gitlab-ci.yml`: ```yaml include: - component: "gitlab.arm.com/ci/component/node@" ``` Installs the NPM modules and caches them. Executes `npm run lint`. Executes `npm test` All of those are then combined together using the ```yaml extends: .node-install script: - !reference [.node-fragment, lint] - !reference [.node-fragment, test] ``` ## Purpose Node projects have a defined workflow through NPM. The components ease setting up the workflow. ## Usage ### Image The `.node` job will use the `node` container from this repo for the same tag as the component version used. The image can be overridden with the [image][image] keyword in the `.gitlab-ci.yml`: ```yaml inputs: image: registry.gitlab.arm.com/ci/component/node job: extends: .node-install ``` ### Global Installation The `node` image has rootless global package installs configured. Global packages can be installed as the default unpriviledge `ci` user. ### Configuration #### `SCOPES` A space separated list of GitLab CI scopes to add authentication for. It defaults to the current project group scope. To install packages from other GitLab scopes (groups) add them to this variable: ```yaml include: - component: "gitlab.arm.com/ci/component/node@" inputs: SCOPES: "build some-other-group" install: extends: .node-install ``` #### `OMIT`/`INCLUDE` These space separated variables allow certain package groups to be installed: ```yaml include: - component: "gitlab.arm.com/ci/component/node@" inputs: OMIT: "dev" INCLUDE: "optional prod" install: extends: .node-install ``` They correspond to the `--omit`/`--include` arguments to `npm`. #### `CACHE_PREFIX` The prefix to add to the NodeJS cache, which defaults to `nodejs-${VERSION}`. This can be used to create different caches. It will always be invalidated when `package-lock.json` changes. [image]: https://docs.gitlab.com/ee/ci/yaml/#image