Results: 44
npm root
Shows the current app folder location
npm root
npm uninstall -g
Removes the package globally
npm uninstall nodemon -g  /  npm uninstall -g nodemon
Installs the package globally
npm install nodemon -g  /  npm install -g nodemon
Updates the package to the current
minor
and
patch
versions but do not update to the current
major
version
npm 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
2
Removes
gulp-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)
NPM installs only modules listed inside
dependencies
key if we run the command with
--production
flag
npm install --production
NPM installs all modules listed inside
dependencies
and
devDependencies
npm install
They will not be listed in
dependencies
but they will get put in their own object called
devDependencies
npm install --save-dev gulp gulp-sass
We can install more than one modules with one command
npm install moment gulp
Default is
true
from NPM version 5.*
Installs all the packages listed in
dependencies
key inside
package.json
file
npm install
Results: 44