定向班第一期_多设备管理平台_190122

STF的安装

npm version检查版本

npm version 

{ npm: '6.4.1',
  ares: '1.10.1-DEV',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.33.0',
  node: '8.15.0',
  openssl: '1.0.2q',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '6.2.414.75',
  zlib: '1.2.11' }

安装依赖

brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config

Updating Homebrew...
Warning: rethinkdb 2.3.6 is already installed and up-to-date
To reinstall 2.3.6, run `brew reinstall rethinkdb`
Warning: graphicsmagick 1.3.31 is already installed and up-to-date
To reinstall 1.3.31, run `brew reinstall graphicsmagick`
Warning: zeromq 4.3.1_1 is already installed and up-to-date
To reinstall 4.3.1_1, run `brew reinstall zeromq`
Warning: protobuf 3.6.1.3_1 is already installed and up-to-date
To reinstall 3.6.1.3_1, run `brew reinstall protobuf`
Warning: yasm 1.3.0_2 is already installed and up-to-date
To reinstall 1.3.0_2, run `brew reinstall yasm`
Warning: pkg-config 0.29.2 is already installed and up-to-date
To reinstall 0.29.2, run `brew reinstall pkg-config

安装stf

npm install -g stf

常见安装问题

  • node的版本太高会引发问题,降级node或者升级stf的个别模块,太高的版本会提示bufferutil包有错误
  • /usr/local/lib/node_modules 目录没有写权限。解决方法:使用chown强行修改权限,把管理员权限修改为当前用户和组的权限,不要使用sudu安装

Node版本管理

brew install node@8
#去掉最新版本的node的指向
brew unlink node
#把node指向到8版本
brew link node@8

完整的重新安装

#删掉缓存的文件
npm cache clean
#删掉整个stf的目录
rm -r /usr/local/lib/node_modules/stf/

启动

···bash
rethinkdb &
#默认管理端口http://127.0.0.1:8080/ 如果冲突的话,需要自己修改
stf local
···

STF的功能

  • adb connect
  • 交互性的调试

STF的api