我克隆了AngularJS Seed应用程序。按照所有说明操作,启动应用程序,然后运行E2E测试。我是在两台不同的机器上做到的。
两者都给出了同样的错误:
> angular-seed@0.0.0 protractor C:\G\angular-seed
> protractor e2e-tests/protractor.conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
npm ERR! angular-seed@0.0.0 protractor: `protractor e2e-tests/protractor.conf.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the angular-seed@0.0.0 protractor script.
npm ERR! This is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor e2e-tests/protractor.conf.js
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-seed
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "pro
ractor"
npm ERR! cwd C:\G\angular-seed
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\G\angular-seed\npm-debug.log
npm ERR! not ok code 0
有没有人对可能出错的事情有任何想法。我注意到这发生在具有最新GIT代码的两台机器上。
这是我从npm-debug.log获得的内容:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'protractor' ]
2 info using npm@1.4.28
3 info using node@v0.10.33
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'preprotractor', 'protractor', 'postprotractor' ]
6 info preprotractor angular-seed@0.0.0
7 verbose unsafe-perm in lifecycle true
8 info protractor angular-seed@0.0.0
9 verbose unsafe-perm in lifecycle true
10 info angular-seed@0.0.0 Failed to exec protractor script
11 error angular-seed@0.0.0 protractor: `protractor e2e-tests/protractor.conf.js`
11 error Exit status 8
12 error Failed at the angular-seed@0.0.0 protractor script.
12 error This is most likely a problem with the angular-seed package,
12 error not with npm itself.
12 error Tell the author that this fails on your system:
12 error protractor e2e-tests/protractor.conf.js
12 error You can get their info via:
12 error npm owner ls angular-seed
12 error There is likely additional logging output above.
13 error System Windows_NT 6.1.7601
14 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor"
15 error cwd C:\G\angular-seed
16 error node -v v0.10.33
17 error npm -v 1.4.28
18 error code ELIFECYCLE
19 verbose exit [ 1, true ]
SDAF
答案 0 :(得分:2)
尝试按此处https://github.com/angular/protractor/issues/187添加chromeOnly: true
。这只发生在Windows上还是你试过linux / mac?