zoukankan      html  css  js  c++  java
  • nodejs安装配置

    最近闲来无事,将自己之前的nodejs配置一下,希望能够帮助想要改变node全局路径的小伙伴们

      1. 安装node

      2. node全局配置

          以将node全局配置在D盘为例:

           a:打开cmd,输入配置命令

          npm config set prefix "D:software odeJs ode-global"

          npm config set cache "D:software odeJs ode-cache"

          b. 修改环境变量,以便能够查到全局变量

            新建变量:NODE_PATH

            D:software odeJs ode-global ode_modules

       3.npm 替代者cnpm

          由于npm是国外的,在下载依赖的包可能因为诸多因素,导致其下载失败,因此有下列替代方法

          1. cnpm 替代 npm

            npm install -g cnpm --registry=https://registry.npm.taobao.org   

          2. config命令

            npm config set registry https://registry.npm.taobao.org 

        

            

        

          

  • 相关阅读:
    【371】Twitter 分类相关
    【370】Python列表生成式(for 写入一行)
    Netbeans 中的编译器相关配置
    SP*
    du 命令
    闲杂
    Shell重定向&>file、2>&1、1>&2的区别
    Shell编程中Shift的用法
    shell中一维数组值得获取
    shell expr的用法
  • 原文地址:https://www.cnblogs.com/goddess/p/8145729.html
Copyright © 2011-2022 走看看