25 lines
538 B
Markdown
25 lines
538 B
Markdown
---
|
|
title: "npm i vs npm ci"
|
|
date: 2020-08-17T11:42:34+02:00
|
|
draft: false
|
|
snippet_types:
|
|
- npm
|
|
- js
|
|
---
|
|
|
|
Today I discovered `npm ci` from a colleague. It does a clean install wiping out the node_modules
|
|
before installing. For me this is perfect because I often find myself doing
|
|
|
|
```shell
|
|
$ rm -rf node_modules && npm i
|
|
```
|
|
|
|
no need just run `npm ci`
|
|
|
|
**note: you'll still want to do `npm i` when installing packages as `npm ci` does not update package\*..*
|
|
|
|
source:
|
|
|
|
- https://docs.npmjs.com/cli/install
|
|
- https://docs.npmjs.com/cli/ci
|
|
|