Node.js 安装及环境配置之 Windows 篇 - Now,DayBreak - 博客园
//npm配置
npm config list
; "builtin" config from F:\nodejs\node_modules\npm\npmrc
; prefix = "C:\\Users\\m1560\\AppData\\Roaming\\npm" ; overridden by user
; "user" config from C:\Users\m1560\.npmrc
cache = "F:\\nodejs\\node_cache"
prefix = "F:\\nodejs\\node_global"
registry = "https://registry.npm.taobao.org/"
; node bin location = F:\nodejs\node.exe
; cwd = C:\Windows\System32
; HOME = C:\Users\m1560
; Run `npm config ls -l` to show all defaults.
//npm设置数据源
npm set registry https://registry.npm.taobao.org/
//全局安装note-sass
npm install node-sass -g
//获取note-sass版本
node-sass -v
node-sass 4.5.3 (Wrapper) [JavaScript]
libsass 3.5.0.beta.2 (Sass Compiler) [C/C++]
//设置npm下载源
npm config set registry https://registry.npm.taobao.org
//获得npm下载源
npm config get registry
//下载cnmp
npm install -g cnpm --registry=https://registry.npm.taobao.org
//下载express
npm install express -g
//express初始化
express helloworld
//npm 启动
npm start
//npm 下载
npm install
//npm 安装nrm,nrm用来管理包数据源
npm install nrm -g --save
-------------------------------
//nrm 查看全部可用源
nrm ls
//nrm 切换源
nrm use taobao
|