替换掉后,appium 起不来了,我是直接用的 gui 的 appium,不是通过 npm 安装的,报错信息如下
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --session-override --platform-version "8.3" --platform-name "iOS" --app "com.example.apple-samplecode.UICatalog" --udid "9c19d97f4d866c53bc3bfd881137e7da9116cff0" --show-ios-log --device-name "iPhone 5s"
error: uncaughtException: Cannot find module 'which' date=Mon Apr 13 2015 15:23:52 GMT+0800 (CST), pid=3702, uid=503, gid=20, cwd=/Applications/Appium.app/Contents/Resources/node_modules/appium, execPath=/Applications/Appium.app/Contents/Resources/node/bin/node, version=v0.12.1, argv=[/Applications/Appium.app/Contents/Resources/node/bin/node, /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/main.js, --command-timeout, 7200, --session-override, --platform-version, 8.3, --platform-name, iOS, --app, com.example.apple-samplecode.UICatalog, --udid, 9c19d97f4d866c53bc3bfd881137e7da9116cff0, --show-ios-log, --device-name, iPhone 5s], rss=65978368, heapTotal=56630784, heapUsed=24391512, loadavg=[1.9794921875, 1.84033203125, 1.77197265625], uptime=21032, trace=[column=15, file=module.js, function=Function.Module._resolveFilename, line=336, method=Module._resolveFilename, native=false, column=25, file=module.js, function=Function.Module._load, line=278, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=365, method=require, native=false, column=17, file=module.js, function=require, line=384, method=null, native=false, column=13, file=/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js, function=, line=7, method=null, native=false, column=26, file=module.js, function=Module._compile, line=460, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=478, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=355, method=load, native=false, column=12, file=module.js, function=Function.Module._load, line=310, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=365, method=require, native=false, column=17, file=module.js, function=require, line=384, method=null, native=false], stack=[Error: Cannot find module 'which', at Function.Module._resolveFilename (module.js:336:15), at Function.Module._load (module.js:278:25), at Module.require (module.js:365:17), at require (module.js:384:17), at Object.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:7:13), at Module._compile (module.js:460:26), at Object.Module._extensions..js (module.js:478:10), at Module.load (module.js:355:32), at Function.Module._load (module.js:310:12), at Module.require (module.js:365:17), at require (module.js:384:17)]