====== Node ====== Keywords: Node, Node.js, NPM ===== Version Syntax ===== * See [[https://semver.npmjs.com/|npm SemVer Calculator]] * ''^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 '' | Uninstall a global package. | | ''npm view versions'' | List the available versions of a package. | | ''npm view @1.3.1 dependencies'' | List the dependencies of a particular version of a package. | | ''npm info '' | 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 '' | Use . |