npm install doesn't save dependency to package.json
npm install
without arguments installs all dependencies (and dev dependencies) listed in the package.json
file.
npm install --production
installs all the dependencies (but no dev dependency)
npm install <package>
installs a package and its dependencies.
npm install <package> --save
installs a package and its dependencies, and adds it in the package.json
file.
Edit: Since npm 5, --save
is implied.