Changes

From SME Server
Jump to navigationJump to search
259 bytes added ,  18:00, 14 December 2016
Line 339: Line 339:  
==Node usage==
 
==Node usage==
   −
Use n, an extremely simple Node version manager that can be installed via npm.
+
Use n, an extremely simple Node version manager that can be installed via npm (See http://stackoverflow.com/questions/7718313/how-to-change-to-an-older-version-of-node-js)
    
Say you want Node.js v0.10.x to build Atom.
 
Say you want Node.js v0.10.x to build Atom.
   −
npm install -g n  # Install n globally
+
npm install -g n  # Install n globally
n 0.10.33          # Install and use v0.10.33
+
n 0.10.33          # Install and use v0.10.33 local only
    
Usage:
 
Usage:
n                            # Output versions installed
+
n                            # Output versions installed
n latest                    # Install or activate the latest node release
+
n latest                    # Install or activate the latest node release
n stable                    # Install or activate the latest stable node release
+
n stable                    # Install or activate the latest stable node release
n <version>                  # Install node <version>
+
n <version>                  # Install node <version>
n use <version> [args ...]  # Execute node <version> with [args ...]
+
n use <version> [args ...]  # Execute node <version> with [args ...]
n bin <version>              # Output bin path for <version>
+
n bin <version>              # Output bin path for <version>
n rm <version ...>          # Remove the given version(s)
+
n rm <version ...>          # Remove the given version(s)
n --latest                  # Output the latest node version available
+
n --latest                  # Output the latest node version available
n --stable                  # Output the latest stable node version available
+
n --stable                  # Output the latest stable node version available
n ls                        # Output the versions of node available
+
n ls                        # Output the versions of node available
 +
 
 +
 
 +
==NPM Usage==
 +
 
 +
To update your version of npm rung the following
 +
 
 +
npm install -g npm
 +
 
 +
Or for a specific version:
 +
 
 +
npm install -g npm@3.10.9

Navigation menu