1.1.21版本运行desktop-browser-sample-nodejs-master例子macha报错
-
Macaca Version: 1.1.21
-
Macaca Doctor Logs: macaca-doctor version: 1.0.28
Node.js checklist:
node env: D:\Program Files\nodejs\node.exe node version: v6.9.2
Android checklist:
JAVA version is
1.6.0_45JAVA_HOME is set toC:\Program Files\Java\jdk1.6.0_45ANDROID_HOME is not set ANT_HOME is not setInstalled driver list:
chrome: 1.0.5
-
Operate System: windows 10 64bit
-
Programming Language: nodejs 下载desktop-browser-sample-nodejs-master 运行:
macaca run -d macaca-test
报错:
webdriver sdk launched
>> E:\learn\Macaca\desktop-browser-sample-nodejs-master\node_modules\.bin\mocha:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
>> Test completed!
参考下 CI的环境 https://travis-ci.org/macaca-sample/desktop-browser-sample-nodejs
我在linux环境上试了下,没有报错,应该是跟操作系统环境相关
https://github.com/macacajs/macaca-cli/pull/68/
已修复,请升级新版cli
https://github.com/alibaba/macaca/issues/359
https://testerhome.com/topics/7491 Macaca Node 版关于 mocha 问题的说明
if operating system environment is windows just delete node_modules.bin\mocha for windows os just mocha.cmd file is required
macaca -v
1.1.22
webdriver sdk launched /usr/local/lib/node_modules/macaca-cli/lib/run/index.js:45 throw err; ^
Error: Cannot find test framework "mocha" in /Users/Shark/Develop/Python/automation/desktop-browser-sample-nodejs/node_modules
还是有这个问题呢。 Mac系统
还有这个问题,请教怎么解决呢 同样是mac系统
localhost:desktop-browser-sample-nodejs Shark$ macaca run -d macaca-test/
webdriver sdk launched module.js:471 throw err; ^
Error: Cannot find module 'should'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.
Test completed!
http://stackoverflow.com/questions/41235382/getting-mocha-error-in-command-prompt/42311434#42311434
mac上1.1.22还有这个问题呢。。有办法解决么
mac 上的1.2.0也有这个问题,,,https://github.com/macaca-sample/mobile-app-sample-nodejs/issues/3