User Tools

Site Tools


node_cheat_sheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
node_cheat_sheet [2025/09/29 02:54] – created stephennode_cheat_sheet [2025/09/29 03:54] (current) stephen
Line 2: Line 2:
  
 Keywords: Node, Node.js, NPM 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 (Node Package Manager) Commands =====
  
 | ''<nowiki>npm list -g --depth=0</nowiki>'' | Show all globally installed packages. | | ''<nowiki>npm list -g --depth=0</nowiki>'' | Show all globally installed packages. |
-| ''<nowiki>npm uninstall -g <package_name></nowiki>'' | Uninstall a global package. |+| ''<nowiki>npm uninstall -g <package-name></nowiki>'' | Uninstall a global package. | 
 +| ''<nowiki>npm view <package-name> versions</nowiki>'' | List the available versions of a package. | 
 +| ''<nowiki>npm view <package-name>@1.3.1 dependencies</nowiki>'' | List the dependencies of a particular version of a package. | 
 +| ''<nowiki>npm info <package-name></nowiki>'' | List a shit ton of info about package. | 
 +| ''<nowiki>Remove-Item -Recurse -Force node_modules</nowiki>'' | Clear the project node modules directory. | 
 +| ''<nowiki>npm config get cache</nowiki>'' | Find the npm cache directory. | 
 +| ''<nowiki>Remove-Item -Recurse -Force "$env:AppData\npm-cache"</nowiki>'' | Clear the project node modules directory. |
  
 ===== NVM (Node Version Manager) Commands ===== ===== NVM (Node Version Manager) Commands =====
node_cheat_sheet.1759114463.txt.gz · Last modified: 2025/09/29 02:54 by stephen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki