title: Cannot resolve module 'babel' after installing babel; nodejs
body: <p>I am trying to run webpack as just <code>webpack</code> and I am getting:</p>
  
  <pre><code>  ERROR in multi main
  Module not found: Error: Cannot resolve module 'babel-loader' in /home/cchilders/CodeTutorials/build-react-starter/client
   @ multi main
  </code></pre>
  
  <p>it seems to think it should resolve in the <code>client</code> folder, but I want it to find packages in <code>node_modules</code>. My webpack.config.js:</p>
  
  <pre><code>var path = require('path');
  
  var config = {
    context: path.join(__dirname, 'client'),
    entry: [
      './main.js',
    ],
    output: {
      path: path.join(__dirname, 'www'),
      filename: 'bundle.js',
    },
    module: {
      loaders: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          loaders: ['babel-loader'],
        },
      ],
    },
    resolveLoader: {
      root: [
        path.join(__dirname, 'node_modules'),
      ],
    },
    resolve: {
      root: [
        path.join(__dirname, 'node_modules'),
      ],
    },
  };
  module.exports = config;
  </code></pre>
  
  <p>The project is at <code>git clone git@bitbucket.org:servandoavila1/codetutorials.git</code></p>
  
  <p>Thank you</p>
  
  <p>EDIT: </p>
  
  <p>the tutorial was outdated and used babel, babel-loaders is required.</p>
  
  <p>Changing the <code>module.loaders</code> to <code>babel-loader</code> from <code>babel</code> and install the loader worked</p>