What is the difference between:
npm install [package_name]
and:
npm install [package_name] --save
and:
All explanations here are great, but lacking a very important thing: How do you install production dependencies only? (without the development dependencies).
We separate dependencies
from devDependencies
by using --save
or --save-dev
.
To install all we use:
npm i
To install only production packages we should use:
npm i --only=production