gulp和webpack开发服务器,获取错误TypeError:this.sockWrite不是函数

gulp和webpack开发服务器,获取错误TypeError:this.sockWrite不是函数,gulp,webpack,webpack-dev-server,Gulp,Webpack,Webpack Dev Server,我正在尝试使用代理选项将webpack dev服务器与浏览器同步集成,并将gulp作为任务主机…获取此错误 TypeError: this.sockWrite is not a function at /.../node_modules/webpack-dev-server/lib/Server.js:29:8 at Compiler.applyPlugins (/.../node_modules/tapable/lib/Tapable.js:26:37) at Compiler.c

我正在尝试使用代理选项将webpack dev服务器与浏览器同步集成,并将gulp作为任务主机…获取此错误

TypeError: this.sockWrite is not a function
  at /.../node_modules/webpack-dev-server/lib/Server.js:29:8
  at Compiler.applyPlugins (/.../node_modules/tapable/lib/Tapable.js:26:37)
  at Compiler.compile (/.../node_modules/webpack/lib/Compiler.js:390:7)
  at Watching.<anonymous> (/.../node_modules/webpack/lib/Compiler.js:46:17)
  at Compiler.next (/.../node_modules/tapable/lib/Tapable.js:67:11)
  at Compiler.invalidAsyncPlugin (/.../node_modules/webpack-dev-middleware/middleware.js:80:3)
  at Compiler.applyPluginsAsync (/.../node_modules/tapable/lib/Tapable.js:71:13)
  at Watching._go (/.../node_modules/webpack/lib/Compiler.js:44:16)
  at Watching.<anonymous> (/.../node_modules/webpack/lib/Compiler.js:36:8)
  at Compiler.readRecords (/.../node_modules/webpack/lib/Compiler.js:302:10)
  at new Watching (/.../node_modules/webpack/lib/Compiler.js:33:16)
  at Compiler.watch (/.../node_modules/webpack/lib/Compiler.js:161:17)
  at module.exports (/.../node_modules/webpack-dev-middleware/middle
及 webpack.config

module.exports = {
  cache: true,
  debug: true,
  devtool: 'source-map',
  extensions: ['', 'js', '.json', '.coffee'],
  entry: './www/static/js/entry.js',
  output: {
    path: path.join(__dirname, '/www/static/js'),
    filename: 'bundle.js'
  },
  watch: true
};

尝试在webpack_dev_服务器前面添加新内容。如果不新建,则该句柄将设置为全局句柄,而不是新对象

module.exports = {
  cache: true,
  debug: true,
  devtool: 'source-map',
  extensions: ['', 'js', '.json', '.coffee'],
  entry: './www/static/js/entry.js',
  output: {
    path: path.join(__dirname, '/www/static/js'),
    filename: 'bundle.js'
  },
  watch: true
};