运行 带有 npm 脚本的 webpack

Run webpack with npm scripts

我尝试使用 npm 脚本但是有一些错误 npm 运行 服务器

> emergency-webclient@1.0.0 server C:\Work\emergency-webclient\src\src\main\webapp\public
> webpack-dev-server

module.js:440
    throw err;
    ^

Error: Cannot find module 'C:\Work\emergency-webclient\src\src\main\webapp\public\*'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.Module._load (module.js:386:25)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:159:18)
    at node.js:444:3

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Illorian\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "server"

也许存在更简单的启动脚本的方法? 之前我用过 gulp

Webpack 和 Webpack-dev-server 作为全局安装。

$ node -v
v6.0.0

$ npm -v
3.8.7

package.json

{
    "dependencies"   : {
        "angular2"        : "latest",
        "rxjs"            : "latest",
        "core-js"         : "^2.3.0",
        "zone.js"         : "~0.6.12",
        "es6-shim"        : "^0.35.0",
        "reflect-metadata": "^0.1.3"
    },
    "devDependencies": {
        //some deps
        "webpack"                    : "^1.13.0",
        "webpack-dev-server"         : "^1.14.1"
    }
}

重新安装 Windows 已帮助解决此问题