易學筆記-第2部分 Node.js入門指南/第5章 Node.js在幣圈流行麼
第2部分 Node.js入門指南/第5章 Node.js在幣圈流行麼/5.1 Node.js在開源社群很流行
第2部分 Node.js入門指南/第5章 Node.js在幣圈流行麼/5.2 Node.js在幣圈也同樣流行
第2部分 Node.js入門指南/第6章 Node.js讓前端開發像子彈飛一樣/6.1 專案需求
第2部分 Node.js入門指南/第6章 Node.js讓前端開發像子彈飛一樣/6.2 技術選型
第2部分 Node.js入門指南/第6章 Node.js讓前端開發像子彈飛一樣/6.3 Node.js簡介
第2部分 Node.js入門指南/第6章 Node.js讓前端開發像子彈飛一樣/6.4 開發步驟
- 安裝步驟參照: 快速搭建 Node.js 開發環境以及加速 npm - CNode技術社群
- 安裝指令碼
-
安裝nvm(node version manage):[[email protected] git]# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
- 通過 nvm 安裝任意版本的 node:
[[email protected] ~]# NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node nvm install 4
- 安裝npm(包管理工具)
[[email protected] ~]# npm --registry=https://registry.npm.taobao.org install koa
[email protected] node_modules/koa
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
[[email protected] ~]#
- 安裝cnpm cli(馬上同步模組)
[[email protected] ~]# npm --registry=https://registry.npm.taobao.org install cnpm -g
npm WARN engine [email protected]: wanted: {"node":">= 6.0.0"} (current: {"node":"4.9.1","npm":"2.15.11"})
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
/root/.nvm/versions/node/v4.9.1/bin/cnpm -> /root/.nvm/versions/node/v4.9.1/lib/node_modules/cnpm/bin/cnpm
[email protected] /root/.nvm/versions/node/v4.9.1/lib/node_modules/cnpm
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[[email protected] ~]#
-
[[email protected] ~]# cnpm sync koa connect mocha
Start sync ["koa","connect","mocha"].
sync koa, PUT https://registry.npm.taobao.org/koa/sync?publish=false&nodeps=false
logurl: https://npm.taobao.org/sync/koa#logid=1297574
[2018-05-28 22:22:25] user: anonymous, sync koa worker start, 1 concurrency, nodeps: false, publish: false, syncUpstreamFirst: false
[2018-05-28 22:22:25] ----------------- Syncing koa -------------------
[2018-05-28 22:22:26] [c#0] [koa] package(https://r.cnpmjs.org/koa) status: 200, dist-tags: {"latest":"2.5.1","next":"2.0.0-alpha.8","v1":"1.6.0"}, time.modified: 2018-04-26T17:11:31.000Z, unpublished: null, start...
[2018-05-28 22:22:26] [koa] found 0 missing star users
[2018-05-28 22:22:26] [koa] all versions are exists
[2018-05-28 22:22:26] [koa] no versions need to deleted
[2018-05-28 22:22:26] [koa] all 285 npm users exists
[2018-05-28 22:22:26] [c#0] [koa] synced success, 0 versions:
[2018-05-28 22:22:26] ----------------- Synced koa success -------------------
[2018-05-28 22:22:26] [done] Sync koa package finished, 1 success, 0 fail
Success: [ koa ]
Fail: [ ]
sync connect, PUT https://registry.npm.taobao.org/connect/sync?publish=false&nodeps=false
logurl: https://npm.taobao.org/sync/connect#logid=1297576
[2018-05-28 22:22:27] user: anonymous, sync connect worker start, 1 concurrency, nodeps: false, publish: false, syncUpstreamFirst: false
[2018-05-28 22:22:27] ----------------- Syncing connect -------------------
[2018-05-28 22:22:28] [c#0] [connect] package(https://r.cnpmjs.org/connect) status: 200, dist-tags: {"1.8":"1.9.0","latest":"3.6.6"}, time.modified: 2018-02-15T05:37:42.000Z, unpublished: null, start...
[2018-05-28 22:22:28] [connect] found 0 missing star users
[2018-05-28 22:22:28] [connect] all versions are exists
[2018-05-28 22:22:28] [connect] no versions need to deleted
[2018-05-28 22:22:28] [connect] all 262 npm users exists
[2018-05-28 22:22:28] [c#0] [connect] synced success, 0 versions:
[2018-05-28 22:22:28] ----------------- Synced connect success -------------------
[2018-05-28 22:22:28] [done] Sync connect package finished, 1 success, 0 fail
Success: [ connect ]
Fail: [ ]
sync mocha, PUT https://registry.npm.taobao.org/mocha/sync?publish=false&nodeps=false
logurl: https://npm.taobao.org/sync/mocha#logid=1297589
[2018-05-28 22:22:30] user: anonymous, sync mocha worker start, 1 concurrency, nodeps: false, publish: false, syncUpstreamFirst: false
[2018-05-28 22:22:30] ----------------- Syncing mocha -------------------
[2018-05-28 22:22:31] [c#0] [mocha] package(https://r.cnpmjs.org/mocha) status: 200, dist-tags: {"beta":"3.0.0-2","latest":"5.2.0"}, time.modified: 2018-05-18T23:36:59.000Z, unpublished: null, start...
[2018-05-28 22:22:32] [mocha] found 0 missing star users
[2018-05-28 22:22:32] [mocha] all versions are exists
[2018-05-28 22:22:32] [mocha] no versions need to deleted
[2018-05-28 22:22:32] [mocha] all 726 npm users exists
[2018-05-28 22:22:32] [c#0] [mocha] synced success, 0 versions:
[2018-05-28 22:22:32] ----------------- Synced mocha success -------------------
[2018-05-28 22:22:32] [done] Sync mocha package finished, 1 success, 0 fail
Success: [ mocha ]
Fail: [ ]
Sync all packages done, successed: ["koa","connect","mocha"], failed: []
[[email protected] ~]#
- .
-