I am using yeoman's angular generator for my AngularJS app. This generator includes grunt and grunt-contrib-connect, which are very useful... but the dependencies are outdated, so I decided to update those.
When doing so, I have an error for grunt-contrib-connect, here it is when I use the --verbose option:
Running "connect:test" (connect) task
Verifying property connect.test exists in config...OK
File: [no files]
Options: protocol="http", port=9001, hostname="localhost", base=".", directory=null,
keepalive=false, debug=false, livereload=35729, open=false, useAvailablePort=false,
onCreateServer=null, middleware=undefined
Warning: undefined is not a function Use --force to continue.
Aborted due to warnings.
So it seems that the middleware is responsible for this issue, here it is:
middleware: function (connect) {
return [
connect.static('.tmp'),
connect.static('test'),
connect().use(
'/bower_components',
connect.static('./bower_components')
),
connect.static(appConfig.app)
];
}
Any assistance to help me figuring this out is more than welcome :)