Npm is a smart package manager and it will install the latest and compatible with the project tag version as default. This command when use with the parameter –save will add the dependence into the package.json file. It is valuable said that the prefix character (^) is added as default too which means for the npm that is for installing a compatible version when you will run the command `npm install`.
Also, you can use the command `$npm update` for automatically update all dependencies for the latest compatible.
Know how works npm and its commands help you avoid issues and a lot of pain. Also, I’d like to suggest avoid fixed versions directly into the file and always as possible use `$npm update` to update the dependences.