我想用我的reactJS applciation編譯webpack和npm的文件。 當我運行時:在Windows上的npm啓動錯誤
npm install --save react-websocket
它的工作正常。 接下來當我執行
npm start
得到以下錯誤:
> [email protected] start D:\ReactServer
> webpack-dev-server --hot
'webpack-dev-server' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `webpack-dev-server --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'webpack-dev-server -- hot'.
npm ERR! This is most likely a problem with the reactapp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs reactapp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls reactapp
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\ReactServer\npm-debug.log
任何人可以幫助我嗎?
錯誤說'webpack-dev-server'有點不對。從[webpack開發工具](https://webpack.github.io/docs/installation.html#dev-tools)文檔看起來您需要另外安裝它。你是否? – makadev