Failed to configure webpack-dev-server, reported an error, and asked the Great Xia to find the road uneven.

  node.js, question

This is my configuration

var webpack          = require('webpack');
 var webpackDevServer = require('webpack-dev-server');
 var wecpackConfig    = module.exports = {};  // init object
 
 // input
 wecpackConfig.entry  = {
 app:[
 './app.js',
 
 './bower_components/ratchet/dist/css/ratchet.css',
 './bower_components/font-awesome/css/font-awesome.css'
 ],
 };
 
 wecpackConfig.output = {
 path:'./dist',
 filename: '[name].js'
 };  // output
 
 //doc loader
 wecpackConfig.module = {
 loaders : [
 bracket
 test: /\.css$/,
 loader: 'style!  css'
 },
 bracket
 test: /\.vue$/,
 loader: 'vue'
 },
 { test: /\.js$/,
 loader: 'babel'
 },
 bracket
 test: /\.(eot(|\?  v=4.5.0)|woff(|\?  v=4.5.0)|woff2(|\?  v=4.5.0)|ttf(|\?  v=4.5.0)|svg(|\?  v=4.5.0))$/,
 loader: 'file'
 },
 bracket
 };
 
 wecpackConfig.plugins = [new webpack.HotModuleReplacementPlugin()];
 wecpackConfig.entry.app.unshift("webpack-dev-server/client?  http://localhost:9999", "webpack/hot/dev-server");
 var compiler = webpack(wecpackConfig);
 var server = new webpackDevServer(compiler, {
 hot: true
 });
 server.listen(9999);

This is the wrong message.

/home/tigerb/github/easy-vue/node_modules/webpack-dev-server/node_modules/webpack-dev-middleware/middleware.js:105
 if(err) throw err;
 ^
 Error: invalid argument
 at pathToArray (/home/tigerb/github/easy-vue/node_modules/webpack-dev-server/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:44:10)
 at MemoryFileSystem.mkdirpSync (/home/tigerb/github/easy-vue/node_modules/webpack-dev-server/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:139:13)
 at MemoryFileSystem.(anonymous function) [as mkdirp] (/home/tigerb/github/easy-vue/node_modules/webpack-dev-server/node_modules/  webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:279:34)
 at Compiler.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compiler.js:229:25)
 at Compiler.applyPluginsAsync (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
 at Compiler.emitAssets (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compiler.js:226:7)
 at Watching.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compiler.js:54:18)
 at /home/tigerb/github/easy-vue/node_modules/webpack/lib/Compiler.js:403:12
 at Compiler.next (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:67:11)
 at Compiler.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/CachePlugin.js:40:4)
 at Compiler.applyPluginsAsync (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:71:13)
 at Compiler.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compiler.js:400:9)
 at Compilation.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:577:13)
 at Compilation.applyPluginsAsync (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
 at Compilation.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:572:10)
 at Compilation.applyPluginsAsync (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
 at Compilation.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:567:9)
 at Compilation.applyPluginsAsync (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
 at Compilation.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:563:8)
 at Compilation.applyPluginsAsync (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
 at Compilation.seal (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:525:7)
 at Compiler.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compiler.js:397:15)
 at /home/tigerb/github/easy-vue/node_modules/webpack/node_modules/tapable/lib/Tapable.js:103:11
 at Compilation.<anonymous> (/home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:445:10)
 at /home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:417:12
 at /home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:332:10
 at /home/tigerb/github/easy-vue/node_modules/webpack/node_modules/async/lib/async.js:52:16
 at done (/home/tigerb/github/easy-vue/node_modules/webpack/node_modules/async/lib/async.js:246:17)
 at /home/tigerb/github/easy-vue/node_modules/webpack/node_modules/async/lib/async.js:44:16
 at /home/tigerb/github/easy-vue/node_modules/webpack/lib/Compilation.js:332:10

// webpack.confib.js

var webpack = require("webpack");
 var vue = require("vue-loader");
 
 var ExtractTextPlugin = require("extract-text-webpack-plugin");
 var HtmlWebpackPlugin = require('html-webpack-plugin');
 var publicPath = "/static/";
 var plugins = [
 new ExtractTextPlugin("style.css"),
 new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js')
 ];
 
 if(process.env.NODE_ENV === 'clean-build'){
 plugins[2] =
 new HtmlWebpackPlugin({
 filename: '../index.html',
 template: './static/template/index.html'
 });
 bracket
 
 var config = {
 entry: {
 app:['./src/main.coffee'],
 vendors: ['vue','jquery','vuex','vue-router']
 },
 output: {
 Path: __dirname plus publicPath,
 filename: 'app.js',
 publicPath: publicPath,
 },
 module: {
 loaders: [
 bracket
 test: /\.vue$/,
 loader: 'vue'
 },
 bracket
 test: /\.coffee$/,
 exclude: /node_modules|vue\/dist|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
 loader: 'coffee'
 },
 bracket
 test: /\.less$/,
 loader: ExtractTextPlugin.extract(
 "style", "css!  less")
 },
 bracket
 test: /\.css$/,
 loader: ExtractTextPlugin.extract(
 "style-loader", "css-loader?  sourceMap!  cssnext-loader")
 },
 bracket
 },
 vue: {
 loaders: {
 css: ExtractTextPlugin.extract("css"),
 less: ExtractTextPlugin.extract("css!  less-loader")
 bracket
 },
 resolve: {
 extensions: ['', '.coffee', '.js'],
 },
 plugins: plugins,
 devtool: "source-map",
 };
 module.exports = config;

app.coffee

webpack = require 'webpack'
 WebpackDevServer = require 'webpack-dev-server'
 config = require './webpack.config'
 
 config.entry.app.unshift "webpack-dev-server/client?  http://localhost:9090", "webpack/hot/dev-server"
 
 config.plugins.push new webpack.HotModuleReplacementPlugin()
 
 proxy = {}
 
 app = new WebpackDevServer(webpack(config), {
 publicPath: config.output.publicPath,
 historyApiFallback: true,
 hot: true,
 });
 
 app.listen(9090);