appium给出TypeError:fn必须是函数错误

时间:2016-11-24 12:00:31

标签: macos selenium appium

我在OSX机器上运行appium。我已经使用下面的命令npm install -g appium安装了appium,我也安装了npm install wd但是我从终端运行appium时收到以下错误。

TypeError: fn must be a function
    See 
    at Function.Promise.promisify (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/promisify.js:268:15)
    at Object.<anonymous> (lib/fs.js:48:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/appium/node_modules/appium-support/build/lib/tempdir.js:12:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/appium/node_modules/appium-support/build/index.js:11:19)

请告诉我如何解决此问题。

1 个答案:

答案 0 :(得分:1)

将appium降级为1.4.10并删除了错误。