我正在嘗試學習如何設置我的開發環境,並從https://egghead.io/lessons/react-react-fundamentals-development-environment-setup?series=react-fundamentals開始瞭解egghead的視頻教程。然而,在第一視頻提到的安裝相關的模塊後,當我嘗試NPM開始,它拋出以下錯誤:我的npm開始反應教程項目不起作用
Shaileshs-MacBook-Pro:react-project shailesh$ npm start
> [email protected] start /Users/shaileshgupta/react-project
> webpack-dev-server
/Users/shaileshgupta/react-project/webpack.config.js:3
output: {
^^^^^^
SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at module.exports (/Users/shaileshgupta/react-project/node_modules/webpack/bin/convert-argv.js:80:13)
at Object.<anonymous> (/Users/shaileshgupta/react-project/node_modules/webpack-dev-server/bin/webpack-dev-server.js:55:48)
at Module._compile (module.js:398:26)
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'webpack-dev-server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the shaileshgupta package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server
npm ERR! You can get their info via:
npm ERR! npm owner ls shaileshgupta
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/shaileshgupta/react-project/npm-debug.log
我撞我的頭,並試圖調試它,但無法找到任何可能的解決方案到它。任何人都可以幫助我理解這裏發生了什麼?如果您需要更多信息,請與我們聯繫。
發佈您的整個webpack.config.js文件 – devwannabe