简体   繁体   English

用Yeoman创建带有Gulp的Angular项目,量角器不起作用

[英]Used Yeoman to create Angular project w/ Gulp, Protractor not working

Subject kind of says it all. 主题有点说明一切。 Using OSX Yosemite, tried updating webdriver, chromedriver and PhantomJS, getting this error: 使用OSX Yosemite,尝试更新webdriver,chromedriver和PhantomJS,出现此错误:

[15:41:30] Starting 'inject'...
[15:41:30] gulp-inject 1 files into index.html.
[15:41:30] gulp-inject 3 files into index.html.
[15:41:30] Finished 'inject' after 84 ms
[15:41:30] Starting 'serve:e2e'...
[15:41:30] Finished 'serve:e2e' after 17 ms
[15:41:30] Starting 'protractor:src'...
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
    [launcher] Process exited with error code 1
    /Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/nexttick.js:39
      goog.global.setTimeout(function() { throw exception; }, 0);
                                            ^
    Error: spawn EACCES
        at exports._errnoException (util.js:746:11)
        at ChildProcess.spawn (child_process.js:1162:11)
        at Object.exports.spawn (child_process.js:995:9)
        at module.exports (/Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/io/exec.js:109:27)
        at /Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:170:21
        at promise.ControlFlow.runInFrame_ (/Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20)
        at promise.Callback_.goog.defineClass.notify (/Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2464:25)
        at promise.Promise.notify_ (/Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:563:12)
        at Array.forEach (native)
        at Object.goog.array.forEach (/Users/jbender/Documents/Github/PTest/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/array/array.js:203:43)

    /Users/jbender/Documents/Github/PTest/gulp/e2e-tests.js:23
            throw err;

ANY help would be appreciated! 任何帮助,将不胜感激!

Thanks, James 谢谢,詹姆斯

UPDATE: I added more of the error message above. 更新:我添加了上面的更多错误信息。

The Error: spawn EACCES error means that the file is not executable. Error: spawn EACCES错误表示该文件不可执行。 I am assuming that you are on a Mac based on the file path, so something like this should fix your problem: 我假设您基于文件路径位于Mac上,因此类似这样的方法应该可以解决您的问题:

cd /Users/jbender/Documents/Github/PTest/
chmod -R +x *

Of course, this probably isn't what you want to do since this will make all your files executable. 当然,这可能不是您想要执行的操作,因为这将使所有文件都可执行。 It's probably one of the files in your node_modules directory that needs to be executable. 这可能是您的node_modules目录中需要执行的文件之一。 Without more information, I can't tell you which one. 没有更多信息,我无法告诉您哪个。 You can probably figure that out on your own. 您可能可以自行解决。

Ugh! 啊! Ok, turns out my installation of Java was corrupted somehow. 好的,原来我的Java安装已以某种方式损坏。 I noticed this when I went to start up WebStorm and it complained. 当我去启动WebStorm时,我注意到了这一点,并且它抱怨。 Reinstalled and it's fine now. 重新安装,现在可以了。 Thanks for the help! 谢谢您的帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM