Mac OS系统cnpm安装fis3

写这篇文章是为了解决npm安装fis3长时间运行无响应,之前写过npm安装fis3的流程,但换了一台mac电脑安装时出现了输入命令行长时间没反应问题;这里就了解cnpm进行安装:

npm安装长时间没反应如下:


SimondeMacBook-Air:~ simon$ npm install -g fis3

npm WARN deprecated minimatch@2.0.4: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated node-uuid@1.4.7: use uuid module instead

cnpm安装:

你可以使用定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:

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

得出如下内容:


/usr/local/bin/cnpm -> /usr/local/lib/node_modules/cnpm/bin/cnpm
/usr/local/lib
└─┬ cnpm@4.4.2 
  ├── auto-correct@1.0.0 
  ├── bagpipe@0.3.5 
  ├── colors@1.1.2 
  ├─┬ commander@2.9.0 
  │ └── graceful-readlink@1.0.1 
  ├─┬ cross-spawn@0.2.9 
  │ └── lru-cache@2.7.3 
  ├─┬ debug@2.6.0 
  │ └── ms@0.7.2 
  ├── giturl@1.0.0 
  ├─┬ npm@3.10.10 
  │ ├── abbrev@1.0.9 
  │ ├── ansi-regex@2.0.0 
  │ ├── ansicolors@0.3.2 
  │ ├── ansistyles@0.1.3 
  │ ├── aproba@1.0.4 
  │ ├── archy@1.0.0 
  │ ├── asap@2.0.5 
  │ ├── chownr@1.0.1 
  │ ├── cmd-shim@2.0.2 
  │ ├─┬ columnify@1.5.4 
  │ │ └─┬ wcwidth@1.0.0 
  │ │   └─┬ defaults@1.0.3 
  │ │     └── clone@1.0.2 
  │ ├─┬ config-chain@1.1.11 
  │ │ └── proto-list@1.2.4 
  │ ├── debuglog@1.0.1 
  │ ├── dezalgo@1.0.3 
  │ ├── editor@1.0.0 
  │ ├── fs-vacuum@1.2.9 
  │ ├── fs-write-stream-atomic@1.0.8 
  │ ├── fstream@1.0.10 
  │ ├─┬ fstream-npm@1.2.0 
  │ │ └─┬ fstream-ignore@1.0.5 
  │ │   └─┬ minimatch@3.0.3 
  │ │     └─┬ brace-expansion@1.1.6 
  │ │       ├── balanced-match@0.4.2 
  │ │       └── concat-map@0.0.1 
  │ ├─┬ glob@7.1.0 

   ......

registry.npm.taobao.org 安装所有模块. 当安装的时候发现安装的模块还没有同步过来, 淘宝 NPM 会自动在后台进行同步, 并且会让你从官方 NPM registry.npmjs.org 进行安装. 下次你再安装这个模块的时候, 就会直接从 淘宝 NPM 安装了.

同步模块直接通过 sync命令马上同步一个模块, 只有 cnpm命令行才有此功能:

$ cnpm sync connect

cnpm命令行:

cnpm install -g fis3

安装结果:


Downloading fis3 to /usr/local/lib/node_modules/fis3_tmp
Copying /usr/local/lib/node_modules/fis3_tmp/.3.4.31@fis3 to /usr/local/lib/node_modules/fis3
Installing fis3's dependencies to /usr/local/lib/node_modules/fis3/node_modules
colors@0.6.2 installed at node_modules/.0.6.2@colors
minimist@1.1.1 installed at node_modules/.1.1.1@minimist
iconv-lite@0.2.10 installed at node_modules/.0.2.10@iconv-lite
commander@1.3.2 installed at node_modules/.1.3.2@commander
fis-lolcat@1.0.1 installed at node_modules/.1.0.1@fis-lolcat
minimatch@2.0.4 installed at node_modules/.2.0.4@minimatch
glob@5.0.3 installed at node_modules/.5.0.3@glob
liftoff@2.2.1 installed at node_modules/.2.2.1@liftoff
fis-optimizer-clean-css@0.0.9 installed at node_modules/.0.0.9@fis-optimizer-clean-css
fis3-command-inspect@1.0.3 installed at node_modules/.1.0.3@fis3-command-inspect
fis3-command-init@1.0.14 installed at node_modules/.1.0.14@fis3-command-init
tar@2.2.1 installed at node_modules/.2.2.1@tar
fis3-command-server@0.0.9 installed at node_modules/.0.0.9@fis3-command-server
fis3-deploy-encoding@1.0.0 installed at node_modules/.1.0.0@fis3-deploy-encoding
fis3-deploy-local-deliver@1.0.0 installed at node_modules/.1.0.0@fis3-deploy-local-deliver
fis-optimizer-uglify-js@0.2.2 installed at node_modules/.0.2.2@fis-optimizer-uglify-js
fis3-hook-components@1.0.4 installed at node_modules/.1.0.4@fis3-hook-components
fis3-packager-map@1.1.3 installed at node_modules/.1.1.3@fis3-packager-map
fis3-errors@* installed at node_modules/.0.0.4@fis3-errors
lodash@4.12.0 installed at node_modules/.4.12.0@lodash
fis-command-install@0.2.17 installed at node_modules/.0.2.17@fis-command-install
fis3-server-node@0.1.1 installed at node_modules/.0.1.1@fis3-server-node
fsevents@1.0.17 download from binary mirror: {"module_name":"fse","module_path":"./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/","remote_path":"./v{version}/","package_name":"{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz","host":"https://npm.taobao.org/mirrors/fsevents"}
fis3-deploy-http-push@2.0.5 installed at node_modules/.2.0.5@fis3-deploy-http-push
fis3-command-release@1.3.12 installed at node_modules/.1.3.12@fis3-command-release
fis-spriter-csssprites@0.3.11 installed at node_modules/.0.3.11@fis-spriter-csssprites
fis-optimizer-png-compressor@0.1.6 installed at node_modules/.0.1.6@fis-optimizer-png-compressor
execute post install scripts...
scripts.install fis3-command-release@1.3.12 › chokidar@1.4.3 › fsevents@1.0.17 run "node-pre-gyp install --fallback-to-build"
[fsevents] Success: "/usr/local/lib/node_modules/fis3/node_modules/.1.0.17@fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
scripts.install fis3-command-release@1.3.12 › chokidar@1.4.3 › fsevents@1.0.17 finished in 313ms
scripts.install fis-optimizer-png-compressor@0.1.6 › node-pngquant-native@1.0.4 run "echo \"Hello, World\""
Hello, World
scripts.install fis-optimizer-png-compressor@0.1.6 › node-pngquant-native@1.0.4 finished in 6ms
scripts.install fis-spriter-csssprites@0.3.11 › images@3.0.0 run "echo \"Hello, World.\""
Hello, World.
scripts.install fis-spriter-csssprites@0.3.11 › images@3.0.0 finished in 5ms
scripts.install fis-optimizer-png-compressor@0.1.6 › node-pngcrush@0.3.7 run "echo \"Hello, World.\""
Hello, World.
scripts.install fis-optimizer-png-compressor@0.1.6 › node-pngcrush@0.3.7 finished in 5ms
deprecate minimatch@2.0.4 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate glob@5.0.3 › minimatch@2.0.10 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate fis-command-install@0.2.17 › fis-scaffold-kernel@0.2.0 › fis-repo-client@0.1.14 › request@2.27.0 › node-uuid@1.4.7 use uuid module instead
All packages installed (317 packages installed from npm registry, used 16s, speed 2.19MB/s, json 353(2.38MB), tarball 31.94MB)
Recently updated (since 2017-01-03): 2 packages (detail see file /usr/local/lib/node_modules/fis3/node_modules/.recently_updates.txt)
  2017-01-05
    → fis3-command-release@1.3.12 › chokidar@1.4.3 › fsevents@1.0.17 (06:25:53)
  2017-01-04
    → fis-command-install@0.2.17 › fis-scaffold-kernel@0.2.0 › prompt@0.2.14 › read@1.0.7 › mute-stream@0.0.7 (06:47:53)
[fis3@3.4.31] link /usr/local/bin/fis3@ -> /usr/local/lib/node_modules/fis3/bin/fis.js

出现如让提示,恭喜你安装成功,让我们来检测一下:

$ fis3 -v

终端输出如下:


[INFO] Currently running fis3 (/usr/local/lib/node_modules/fis3/)

  v3.4.31

   /\\\\\\\\\\\\\\\  /\\\\\\\\\\\     /\\\\\\\\\\\   
   \/\\\///////////  \/////\\\///    /\\\/////////\\\        
    \/\\\                 \/\\\      \//\\\      \///  
     \/\\\\\\\\\\\         \/\\\       \////\\\              
      \/\\\///////          \/\\\          \////\\\          
       \/\\\                 \/\\\             \////\\\      
        \/\\\                 \/\\\      /\\\      \//\\\  
         \/\\\              /\\\\\\\\\\\ \///\\\\\\\\\\\/   
          \///              \///////////    \///////////     
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,457评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,837评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,696评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,183评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,057评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,105评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,520评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,211评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,482评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,574评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,353评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,213评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,576评论 3 298
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,897评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,174评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,489评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,683评论 2 335

推荐阅读更多精彩内容