zoukankan      html  css  js  c++  java
  • windows 安装nvm步骤(shi'yongnvm-windows管理node版本):

     

     

    瞎几把前言:mac上可以用n来管理node版本,私以为n很好用。家里的win7台式机一直没有安装过任何管理工具,今天来给家里电脑安装一下nvw-windows,一个用于windows系统的node版本工具。

     

    电脑系统:系统win7 64位:

     

    nvw-windows的官网:https://github.com/coreybutler/nvm-windows/releases

     

    一、安装步骤:

    (一)下载:

    首先从官网下载安装包 https://github.com/coreybutler/nvm-windows/releases,我下了一个setup版本的,下下来是个压缩包,解压后里面是一个exe,安装方式就如同一个常见的exe安装包,双击运行即可:

     

     

    (一)安装:

    1.双击exe开始安装:

    2.下面这一步:配置nvm的安装位置,任意一个你喜欢的位置都可以。

    3.设置node的symlink文件夹位置。这个文件夹的名字一定不能含有中文或空格!

     

     

    4.如果在安装nvm之前,电脑上就已经安装有node的,会看到如下图,询问你是否用nvm管理已经存在的node版本。一定要选‘是’,这个弹窗可能会出现好几次,都点是。

    5.安装完成。看到如下图:

     

    (二)使用nvm:

    1.检查nvm是否安装成功:

    使用管理员权限打开一个命令行。输入nvm v,会显示nvm的版本号,有则表示安装成功。

    2. 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. Type available at 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 using use in a specific directory (or using .nvmrc), please refer to issue #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 use https://npm.taobao.org/mirrors/node/
    • nvm npm_mirror <npm_mirror_url>: Set the npm mirror.People in China can use https://npm.taobao.org/mirrors/npm/

     

    3. nvm常用命令(个人对上述命令中的常用命令的一个总结和翻译):

    •  安装指定版本的node: nvm install 版本号

        比如安装8.9.3:

    nvm install 8.9.3
    •  使用指定版本的node: nvm use 版本号

        比如使用8.9.3:

    nvm use 8.9.3
    •  使用淘宝node镜像:nvm node_mirror
    • 使用淘宝npm镜像:nvm npm_mirror
    • 查看当前电脑上已经安装的全部node版本,正在使用中的版本号前有个星号:
    nvm ls
    • 查看可用的(可下载的)全部node版本:
    nvm ls available

    二、NVM使用中常见错误:

    (一)、nvm use  出现exit status 1

  • 相关阅读:
    opencv-活体检测
    人脸识别
    Opencv-python基本操作
    白话深度学习与Tensorflow(二)
    Linux系统入门(一)-未完成
    编程题29 题目:求对角线元素之和
    编程题28 题目 排序
    编程题27 题目:求100之内的素数
    编程题 18兵乓球比赛
    编程题21 求阶数总和
  • 原文地址:https://www.cnblogs.com/hamsterPP/p/8076131.html
Copyright © 2011-2022 走看看