grunt-contrib-connect错误:中间件未定义

Nic*_*las 5 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: [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.
Run Code Online (Sandbox Code Playgroud)

所以似乎中间件负责这个问题,这里是:

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

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

use*_*062 0

使用grunt-contrib-connect版本 0.10.1 似乎为我解决了这个问题。问题 161可能相关。