Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.21版本运行desktop-browser-sample-nodejs-master例子macha报错 #445

Closed
DreamTear opened this issue Feb 10, 2017 · 12 comments
Closed
Assignees

Comments

@DreamTear
Copy link

  • 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_45
    JAVA_HOME is set to C:\Program Files\Java\jdk1.6.0_45
    ANDROID_HOME is not set
    ANT_HOME is not set

    Installed 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!
@xudafeng
Copy link
Member

@DreamTear
Copy link
Author

我在linux环境上试了下,没有报错,应该是跟操作系统环境相关

@xudafeng
Copy link
Member

macacajs/macaca-cli#68

@xudafeng
Copy link
Member

xudafeng commented Feb 15, 2017

已修复,请升级新版cli

@xudafeng
Copy link
Member

#359

@xudafeng
Copy link
Member

https://testerhome.com/topics/7491 Macaca Node 版关于 mocha 问题的说明

@sachinGirish
Copy link

if operating system environment is windows just delete node_modules.bin\mocha
for windows os just mocha.cmd file is required

@dreambe
Copy link

dreambe commented Feb 16, 2017

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系统

@dreambe
Copy link

dreambe commented Feb 16, 2017

还有这个问题,请教怎么解决呢
同样是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. (/Users/Shark/Develop/Python/automation/desktop-browser-sample-nodejs/macaca-test/desktop-browser-sample-nodejs.test.js:3:1)
at Module._compile (module.js:570:32)
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.require (module.js:497:17)
at require (internal/module.js:20:19)
at /Users/Shark/Develop/Python/automation/desktop-browser-sample-nodejs/node_modules/mocha/lib/mocha.js:222:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/Shark/Develop/Python/automation/desktop-browser-sample-nodejs/node_modules/mocha/lib/mocha.js:219:14)
at Mocha.run (/Users/Shark/Develop/Python/automation/desktop-browser-sample-nodejs/node_modules/mocha/lib/mocha.js:487:10)
at Object. (/Users/Shark/Develop/Python/automation/desktop-browser-sample-nodejs/node_modules/mocha/bin/_mocha:459:18)
at Module._compile (module.js:570:32)
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!

@xiaoxiao257
Copy link

mac上1.1.22还有这个问题呢。。有办法解决么

@ElesG
Copy link

ElesG commented Mar 15, 2017

mac 上的1.2.0也有这个问题,,,https://github.com/macaca-sample/mobile-app-sample-nodejs/issues/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants