Gruntjs grunt contrib连接错误:中间件未定义

Gruntjs grunt contrib连接错误:中间件未定义,gruntjs,grunt-contrib-connect,Gruntjs,Grunt Contrib Connect,我正在为我的AngularJS应用程序使用yeoman的角度生成器。此生成器包括grunt和grunt contrib connect,它们非常有用。。。但是依赖项已经过时了,所以我决定更新它们 执行此操作时,grunt contrib connect有一个错误,当我使用--verbose选项时: Running "connect:test" (connect) task Verifying property connect.test exists in config...OK File: [n

我正在为我的AngularJS应用程序使用yeoman的角度生成器。此生成器包括grunt和grunt contrib connect,它们非常有用。。。但是依赖项已经过时了,所以我决定更新它们

执行此操作时,grunt contrib connect有一个错误,当我使用--verbose选项时:

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.
因此,似乎是中间件导致了这个问题,这里是:

middleware: function (connect) {
            return [
              connect.static('.tmp'),
              connect.static('test'),
              connect().use(
                '/bower_components',
                connect.static('./bower_components')
              ),
              connect.static(appConfig.app)
            ];
          }

任何帮助我解决这个问题的帮助都是非常受欢迎的:)

使用
grunt contrib connect
0.10.1版似乎可以解决这个问题。可能与此有关。

我也有同样的问题,目前尚未解决。FWIW,我不认为
中间件=未定义的
是问题所在,因为我在grunt connect工作的项目中看到了同样的问题。