What’s the Difference Between npm install vs npm install --save? (2019)

From NPM5 moving forward, there’s no difference between npm install and npm install --save — so save yourself some unnecessary typing.

Before NPM5, the difference was that npm install --save would save your installed package to your package.json file as a devDependency — now that happens by default when you just use npm install.

devDependencies are packages used for development purposes, e.g for running tests or transpiling your code. Many packages that you install during development are not required for your app to work in production — so we add those to our package.json devDependencies object.

Regular dependencies are packages that are required for your production-ready site or app to work.


Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on