一瓦哎、 STF安裝
1柔逼、STF官網(wǎng):
https://github.com/openstf/stf
2愉适、安裝依賴:
brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config
3维咸、安裝STF:
npm install -g stf
二、環(huán)境依賴
1瞬哼、npm及node版本(node.js最好為8.X系列
)
$ npm version
{ wangjuan: '1.0.0',
npm: '5.5.1',
ares: '1.10.1-DEV',
cldr: '31.0.1',
http_parser: '2.7.0',
icu: '59.1',
modules: '57',
nghttp2: '1.25.0',
node: '8.9.1',
openssl: '1.0.2m',
tz: '2017b',
unicode: '9.0',
uv: '1.15.0',
v8: '6.1.534.47',
zlib: '1.2.11' }
2坐慰、 RethinkDB >= 2.2
3用僧、不支持windows
三、常見問題
1把跨、提示bufferutil包錯(cuò)誤沼死,報(bào)錯(cuò)信息如下:
16959 verbose stack Error: bufferutil@1.3.0 install: `node-gyp rebuild`
16959 verbose stack Exit status 1
16959 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
16959 verbose stack at EventEmitter.emit (events.js:182:13)
16959 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
16959 verbose stack at ChildProcess.emit (events.js:182:13)
16959 verbose stack at maybeClose (internal/child_process.js:962:16)
16959 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
16960 verbose pkgid bufferutil@1.3.0
16961 verbose cwd /Users/wangjuan
16962 verbose Darwin 18.2.0
16963 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "stf" "-g" "--unsafe-perm"
16964 verbose node v10.13.0
16965 verbose npm v6.4.1
16966 error code ELIFECYCLE
16967 error errno 1
16968 error bufferutil@1.3.0 install: `node-gyp rebuild`
16968 error Exit status 1
16969 error Failed at the bufferutil@1.3.0 install script.
解決方案:降低node.js版本意蛀,最好為8.X系列 !~
2、提示/usr/local/lib/node_modules 目錄沒有寫權(quán)限秀姐,報(bào)錯(cuò)信息如下:
553 error Error: EACCES: permission denied, access '/usr/local/lib/node_modules/stf/node_modules/@slack/client/node_modules/async'
2553 error { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/stf/node_modules/@slack/client/node_modules/async'
2553 error stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/stf/node_modules/@slack/client/node_modules/async\'',
2553 error errno: -13,
2553 error code: 'EACCES',
2553 error syscall: 'access',
2553 error path: '/usr/local/lib/node_modules/stf/node_modules/@slack/client/node_modules/async' }
2554 error The operation was rejected by your operating system.
2554 error It is likely you do not have the permissions to access this file as the current user
2554 error
2554 error If you believe this might be a permissions issue, please double-check the
2554 error permissions of the file and its containing directories, or try running
2554 error the command again as root/Administrator (though this is not recommended).
2555 verbose exit [ -13, true ]
解決方案:
1省有、刪除原有stf文件夾,重新安裝伸头,千萬別用sudo來執(zhí)行安裝恤磷。
rm -rf /usr/local/lib/node_modules/stf/
2扫步、給/usr/local/lib/node_modules/stf/賦予權(quán)限河胎,更改用戶及所屬組
chown 當(dāng)前用戶:當(dāng)前用戶的默認(rèn)組 -R 目錄
以上虎敦,對你有幫助的話原茅,點(diǎn)贊??吧~~
歡迎關(guān)注我的簡書,博客,TesterHome,Github~~~