npm list --depth 0
Shows all packages with only their dependencies (one level deep)npm list --depth 1npm listnpm root -gThe result (on this computer) isC:\Users\Admin\AppData\Roaming\npm\node_modulesnpm install nodemon -g / npm install -g nodemonmajor version will stick to 1 but minor and patch will be the latest versions"dependencies": {
"moment": "^1.6.2"
}
Only updates patch but major and minor will be the specified versions"dependencies": {
"moment": "~1.6.2"
}
Exactly the specified version 1.6.2 will be installed"dependencies": {
"moment": "1.6.2"
}
The latest version of the package will be installed"dependencies": {
"moment": "*"
}minor and patch versions but do not update to the current major versionnpm update moment
Before update""dependencies": {
"moment": "^1.6.2"
}
After update"dependencies": {
"moment": "^1.7.2"
}
The package updated to 1.7.2 even though the current major version is 2npm install moment@2.25.2
Installs the specified module with the latest patch npm install moment@2.25
Installs the specified module with the latest minor and patch versions npm install moment@1
Installs the latest version of the module (with latest major, minor and patch versions)npm install momentgulp-sass module
npm uninstall gulp-sass
npm un gulp-sass
npm remove gulp-sass
npm rm gulp-sass
All the above commands do the same thing (uninstalling the module)