Including of the word --save means? or What is the Difference betweeen:
npm install and npm install --save?
Including of the word --save means? or What is the Difference betweeen:
npm install and npm install --save?
Base on the npm documentations:
For older versions of NPM:
The npm install <package_name>
command just downloads the specified package from NPM cloud, and saves it in node_modules
directory in your current directory.
The npm install <package_name> --save
command downloads the specified package from NPM cloud, and saves it in node_modules
directory in your current directory, and also it adds the installed package into dependencies
section of your package.json
file.
For NPM versions > 5, there is no difference between these two commands. That is, the first command without --save option downloads the package and adds it into dependencies section of package.json
file.