After I upgraded to latest stable node and npm, I tried npm install moment --save. It saves the entry in the package.json
node
npm
npm install moment --save
package.json
~ specfices to minor version releases ^ specifies to major version releases
For example if package version is 4.5.2 ,on Update ~4.5.2 will install latest 4.5.x version (MINOR VERSION) ^4.5.2 will install latest 4.x.x version (MAJOR VERSION)