约曼“咕噜测试”干净的项目失败,“端口已在使用” [英] Yeoman 'grunt test' fails on clean project with 'port already in use'

查看:118
本文介绍了约曼“咕噜测试”干净的项目失败,“端口已在使用”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用:


  • 的Mac OS 10.8.4

  • 节点0.10.12

  • NPM 1.3.1

  • 咕噜-CLI 0.1.9

  • 哟1.0.0-RC.1

  • 亭子0.9.2

  • generator-angular@0.3.0

我遇到一个干净的哟角项目下面的错误,其次是咕噜服务器然后咕噜测试

I encounter the following error with a clean yo angular project, followed by grunt server then grunt test:

Running "connect:test" (connect) task  
Fatal error: Port 9000 is already in use by another process.

我是新来的约曼和我难住了。我已经删除了我原来的项目,并创建了一个新的文件夹,一个新的公正,以确保我没有任何可以俯瞰隐形CONFIGS。我重新启动计算机以确保我没有运行我已经忘记了任何临时服务器进程。所有尝试后,基本服务器启动正常,重视Chrome和观察者更新上进行任何更改浏览器。 (值得注意的是,在服务器上运行的9000,这似乎很奇怪的测试亚军也可以尝试使用9000),但我得到试图启动测试运行同样的错误。

I'm new to Yeoman and am stumped. I've deleted my original project and created a new one in a fresh folder just to make sure I wasn't overlooking any invisible configs. I restarted the machine to make sure I wasn't running any temporary server processes I had forgotten about. After all attempts, the basic server starts fine, attaches to Chrome, and the watcher updates the browser on any changes. (Notably, the server is running on 9000, which seems odd for the test-runner to also be trying to use 9000.) But I get that same error on attempting to start the test runner.

这是不是我可以修复,还是一个问题,我应该到约曼队报到?谢谢你。

Is this something I can fix, or an issue I should report to the Yeoman team? Thanks.

推荐答案

我创建了一个新的配置属性: connect.test.options.port ,并将其设置为9001而现在,他们似乎是在不同的端口运行正常。

I created a new config property: connect.test.options.port, and set that to 9001. Now they appear to be running properly on separate ports.

还要注意的是 Gruntfile.js 是压倒在 singleRun 属性。 conf.js 。如果你想在 karma.conf.js 的配置才能正常工作注释/切断了这一点。

Note also that the Gruntfile.js is overriding the singleRun property in karma.conf.js. Comment/cut that out if you want the config in karma.conf.js to work properly.

编辑13年11月4日:
问题被其他人也报道,似乎已与变更处理发电机棱角分明。

EDIT 11/4/13: The issue was reported by others as well and seems to have been addressed with changes to generator-angular.

这篇关于约曼“咕噜测试”干净的项目失败,“端口已在使用”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆