node_cheat_sheet
Table of Contents
Node
Keywords: Node, Node.js, NPM
Version Syntax
^1.2.3
means everything above, excluding major version increases. 🗹 1.2.4, 1.3.1 🗵 2.0.0.~1.2.3
mean everything above, excluding major and minor version increases. 🗹 1.2.4 🗵 1.3.1, 2.0.0.
NPM (Node Package Manager) Commands
npm list -g --depth=0 | Show all globally installed packages. |
npm uninstall -g <package-name> | Uninstall a global package. |
npm view <package-name> versions | List the available versions of a package. |
npm view <package-name>@1.3.1 dependencies | List the dependencies of a particular version of a package. |
npm info <package-name> | List a shit ton of info about package. |
Remove-Item -Recurse -Force node_modules | Clear the project node modules directory. |
npm config get cache | Find the npm cache directory. |
Remove-Item -Recurse -Force "$env:AppData\npm-cache" | Clear the project node modules directory. |
NVM (Node Version Manager) Commands
nvm on | Enable Node Version Manager. |
nvm off | Enable Node Version Manager. |
nvm ls | List installed Node versions, including currently selected version. |
nvm use <version> | Use <version>. |
node_cheat_sheet.txt · Last modified: 2025/09/29 03:54 by stephen