Even though both --save and --save-dev flags are used to install packages locally, there are certain aspects in which these two differ.
The difference between --save and --save-dev is explained in the following table:
|Packages installed using --save are the core dependencies of the project.||Packages installed using --save-dev are used during the project's development phase.|
|--save makes an entry of the package in the
|Examples of packages installed using the --save flag are express, socket.io, etc.||Packages installed using --save-dev flag are nodemon, eslint, mocha, etc.|
|Packages needed for the proper functioning of the project are installed using the --save flag.||--save-flag is used when you need packages only for development purposes.|
Note: To learn more about --save and --save-dev, visit the following tutorials: