With:
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.
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.
Add port: 9001
to test, like this:
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.
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.
EDIT 11/4/13: The issue was reported by others as well and seems to have been addressed with changes to generator-angular.
After I change the port, there is a XHR error,
The 'Access-Control-Allow-Origin' header has a value 'http://localhost:9000' that is not equal to the supplied origin. Origin 'http://localhost:9090' is therefore not allowed access.
It was 9000 initially and then I change the grunt
connect: {
main: {
options: {
port: 9090
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With