npm ci is a new npm command introduced in npm 6. Let's see how this command is different with npm install
NPM CI
npm ci characteristics:
- Faster than
npm install🐇 - If
node_modulespresent, it will be deleted to ensure clean state 💪🏼 - It can't be used to install new dependency or update existing dependency
- It will use
package-lock.jsonto install all dependencies - It never modifies
package.jsonorpackage-lock.jsonfile - It will throw error if version in
package.jsondo not match withpackage-lock.json - Suitable for automated environment such as continuous integration
npm ci will always delete node modules 
npm ci will throw error if version is different in package.json vs package-lock.json 
NPM Install
npm install characteristics:
- To install a new dependency or update existing dependency
- It could modify
package-lock.jsonwhen you install a new dependency or update existing one - It could install different version vs the one that you specify in
package.jsonif you use^or~😓
For example, the version in package.json is ~4.17.0, but after running npm install, in package-lock.json, it will use 4.17.20 (the latest patch version)
Conclusion
Use npm ci for automated environment such as CI/CD while npm install to install a new dependency or update dependencies.

