1. 程式人生 > 實用技巧 >nvm 常用命令

nvm 常用命令

  • nvm arch [32|64]: Show if node is running in 32 or 64 bit mode. Specify 32 or 64 to override the default architecture.
  • nvm install <version> [arch]: The version can be a node.js version or "latest" for the latest stable version. Optionally specify whether to install the 32 or 64 bit version (defaults to system arch). Set[arch]
    to "all" to install 32 AND 64 bit versions.
  • nvm list [available]: List the node.js installations. Typeavailableat the end to show a list of versions available for download.
  • nvm on: Enable node.js version management.
  • nvm off: Disable node.js version management (does not uninstall anything).
  • nvm proxy [url]
    : Set a proxy to use for downloads. Leave[url]blank to see the current proxy. Set[url]to "none" to remove the proxy.
  • nvm uninstall <version>: Uninstall a specific version.
  • nvm use <version> [arch]: Switch to use the specified version. Optionally specify 32/64bit architecture.nvm use <arch>
    will continue using the selected version, but switch to 32/64 bit mode based on the value supplied to<arch>. For information about usingusein a specific directory (or using.nvmrc), please refer toissue #16.
  • nvm root <path>: Set the directory where nvm should store different versions of node.js. If<path>is not set, the current root will be displayed.
  • nvm version: Displays the current running version of NVM for Windows.
  • nvm node_mirror <node_mirror_url>: Set the node mirror.People in China can usehttps://npm.taobao.org/mirrors/node/
  • nvm npm_mirror <npm_mirror_url>: Set the npm mirror.People in China can usehttps://npm.taobao.org/mirrors/npm/