Node.js
- Kiazsoft
- May 21, 2020
- 1 min read
Updated: May 22, 2020
To list all dependencies and their versions
npm list
To list dependencies of only the current application
npm list --depth=0
To list outdated packages
npm outdated
To list all global outdated packges
npm -g outdated
To install dependency only for dev
npm install <dependency> --save-dev
To uninstall a dependency
npm uninstall <dependency>
To uninstall a dependency globally
npm uninstall -g <dependency>
What is n?
n is a version manager for node.js
Once node.js & npm is installed you can install n globally with
npm install -g n
for mac - sudo npm install -g n
Activate/install specific version of node using n
n <node-version>
for mac - sudo n <node-version>
Comments