sudo npm install -g webpack
This doesn't work if you have installed the latest webpack (2.5.0) globally. So you should install webpack 2.2.1 and not globally (it is not recommended to install globally, see: https://webpack.js.org/guides/installation/)
Instead run this command:
npm install --save-dev firstname.lastname@example.org
this is mentioned further down in the text.
Share this highlighthttp://www.safaribooksonline.com/a/learning-react-1st/7373865/