Mac OS系统cnpm安装fis3

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

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


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

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: 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
└─┬ [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] 

   ......

从 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
[email protected] installed at node_modules/.0.6.2@colors
[email protected] installed at node_modules/.1.1.1@minimist
[email protected] installed at node_modules/.0.2.10@iconv-lite
[email protected] installed at node_modules/.1.3.2@commander
[email protected] installed at node_modules/.1.0.1@fis-lolcat
[email protected] installed at node_modules/.2.0.4@minimatch
[email protected] installed at node_modules/.5.0.3@glob
[email protected] installed at node_modules/.2.2.1@liftoff
[email protected] installed at node_modules/.0.0.9@fis-optimizer-clean-css
[email protected] installed at node_modules/.1.0.3@fis3-command-inspect
[email protected] installed at node_modules/.1.0.14@fis3-command-init
[email protected] installed at node_modules/.2.2.1@tar
[email protected] installed at node_modules/.0.0.9@fis3-command-server
[email protected] installed at node_modules/.1.0.0@fis3-deploy-encoding
[email protected] installed at node_modules/.1.0.0@fis3-deploy-local-deliver
[email protected] installed at node_modules/.0.2.2@fis-optimizer-uglify-js
[email protected] installed at node_modules/.1.0.4@fis3-hook-components
[email protected] installed at node_modules/.1.1.3@fis3-packager-map
fis3-errors@* installed at node_modules/.0.0.4@fis3-errors
[email protected] installed at node_modules/.4.12.0@lodash
[email protected] installed at node_modules/.0.2.17@fis-command-install
[email protected] installed at node_modules/.0.1.1@fis3-server-node
[email protected] 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"}
[email protected] installed at node_modules/.2.0.5@fis3-deploy-http-push
[email protected] installed at node_modules/.1.3.12@fis3-command-release
[email protected] installed at node_modules/.0.3.11@fis-spriter-csssprites
[email protected] installed at node_modules/.0.1.6@fis-optimizer-png-compressor
execute post install scripts...
scripts.install [email protected][email protected][email protected] 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 [email protected][email protected][email protected] finished in 313ms
scripts.install [email protected][email protected] run "echo \"Hello, World\""
Hello, World
scripts.install [email protected][email protected] finished in 6ms
scripts.install [email protected][email protected] run "echo \"Hello, World.\""
Hello, World.
scripts.install [email protected][email protected] finished in 5ms
scripts.install [email protected][email protected] run "echo \"Hello, World.\""
Hello, World.
scripts.install [email protected][email protected] finished in 5ms
deprecate [email protected] Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate [email protected][email protected] Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate [email protected][email protected][email protected][email protected][email protected] 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
    → [email protected][email protected][email protected] (06:25:53)
  2017-01-04
    → [email protected][email protected][email protected][email protected][email protected] (06:47:53)
[[email protected]] 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

   /\\\\\\\\\\\\\\\  /\\\\\\\\\\\     /\\\\\\\\\\\   
   \/\\\///////////  \/////\\\///    /\\\/////////\\\        
    \/\\\                 \/\\\      \//\\\      \///  
     \/\\\\\\\\\\\         \/\\\       \////\\\              
      \/\\\///////          \/\\\          \////\\\          
       \/\\\                 \/\\\             \////\\\      
        \/\\\                 \/\\\      /\\\      \//\\\  
         \/\\\              /\\\\\\\\\\\ \///\\\\\\\\\\\/   
          \///              \///////////    \///////////     

你可能感兴趣的:(Mac OS系统cnpm安装fis3)