# ci-node-modules

> Clean install node_modules using the appropriate installation command

Latest version **1.1.0** (published 2019-06-26) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ci-node-modules
pnpm add ci-node-modules
yarn add ci-node-modules
bun add ci-node-modules
```

Provides the command `ci-node-modules`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-06-26 |
| First published | 2018-12-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Thodoris Greasidis |
| Maintainers | balena.io |
| Keywords | ci, node_modules, npm, yarn, clean, install |

## Links

- npm: https://www.npmjs.com/package/ci-node-modules
- Repository: https://github.com/balena-io-modules/ci-node-modules
- Homepage: https://github.com/balena-io-modules/ci-node-modules#readme
- Issues: https://github.com/balena-io-modules/ci-node-modules/issues
- npm.io page: https://npm.io/package/ci-node-modules

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-06-26
- 1.1.0-3-npm-shrinkwrap-json-a960ffee0bc68fd493586ecc2369baecfb75105a — 2019-06-26
- 1.0.1 — 2019-01-14
- 1.0.1-fix-readme-typo-d5e689d4b179e8907f614693263eda90a863f433 — 2019-01-14
- 1.0.0 — 2018-12-27
- 1.0.0-initial-code-commit-95d1deb21cf5ee859172ae5bd80ea8f323a5aabe — 2018-12-23
- 1.0.0-initial-code-commit-847bb0f6199f7b791c2db0c0e6705131d19e8972 — 2018-12-22

## README

# ci-node-modules

A simple sh script that does a clean install of your node_modules dependencies
based on the JavaScript package manager that is most likely being used.

This is designed to:
* delete any pre-existing node_modules folder, so that you don't have stale
  dependencies
* do a clean install of your node module dependencies using the appropriate
  package manager & command based on:
  * whether a yarn.lock exists in the folder
  * whether a package-lock.json exists in the folder
  * whether just a package.json exists in the folder

This depends on `/bin/sh` pointing to a sensible shell, and on `npm` and/or
`yarn` being available in your `$PATH`.

## Why this is useful

This removes the need for you to remember or figure out the appropriate
installation method for the dependencies of any project/module. In case you are
switching between several projects who use different lock file types or no lock
files at all, having to figure out and run the appropriate command can be
counter-productive.

Moreover this also does a clean install of the dependencies
every time, eliminating the chance of facing issues when switching between
branches that are using different versions for some dependencies. For example,
you are trying out a branch that bumps the version of module XYZ to the
next major one and then switch back to work on something different using the
old dependencies.

## Get started

Install it:

```
npm install -g ci-node-modules
```

Navigate to the folder of a JS project/module and run it:

```
ci-node-modules
```

---
_Source: https://npm.io/package/ci-node-modules · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
