I am trying to learn react and following egghead's video tut from https://egghead.io/lessons/react-react-fundamentals-development-environment-setup?series=react-fundamentals on setting up my dev environment. However, after installing relevant modules as mentioned in the first video, when I try npm start, it is throwing following error:
Shaileshs-MacBook-Pro:react-project shailesh$ npm start
> shaileshgupta@1.0.0 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! shaileshgupta@1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shaileshgupta@1.0.0 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
I banged my head and tried to debug it, but couldn't find any possible solution to it. Could anyone help me understand what is going on here? Let me know if you need more information.