title: Cannot find module that's been specified in babel.config.json
body: <p>I'm new to using Babel but have installed it according to the Installation guide here <a href="https://babeljs.io/setup#installation" rel="nofollow noreferrer">https://babeljs.io/setup#installation</a></p>
  
  <p>It says at the end that you need to install plugins in order for it to work:</p>
  
  <blockquote>
    <p>Now, out of the box Babel doesn't do anything ... You will need to add plugins for Babel to do anything.</p>
  </blockquote>
  
  <p>I want to use this plugin: <a href="https://babeljs.io/docs/en/babel-plugin-transform-async-to-generator" rel="nofollow noreferrer">https://babeljs.io/docs/en/babel-plugin-transform-async-to-generator</a> to fix some Internet Explorer 11 issues as described here: <a href="https://stackoverflow.com/questions/45681318/async-function-declaration-expects-in-internet-explorer/45681357">async function declaration expects &#39;;&#39; in Internet Explorer</a></p>
  
  <p>I've created a file in the root of my project called <code>babel.config.json</code> and added the following to it.</p>
  
  <pre><code>{
      "plugins": ["@babel/plugin-transform-async-to-generator"]
  }
  </code></pre>
  
  <p>My <code>package.json</code> contains this:</p>
  
  <pre><code>"scripts": {
       "build": "babel webroot/js -d webroot/js/babel"
  },
  "devDependencies": {
       "babel-cli": "^6.0.0"
  },
  </code></pre>
  
  <p>When I execute <code>npm run build</code> from my project root it gives the following error messages.</p>
  
  <pre><code>Error: Cannot find module '@babel/plugin-transform-async-to-generator' from '/Users/andy/my-project'
  </code></pre>
  
  <p>Prior to creating <code>babel.config.json</code> I <em>was able</em> to run <code>npm run build</code> without getting any errors. As per the quote this doesn't really do anything other than output the same JavaScript as I had before transpiling it. But I knew that the process worked - in my case the input files are in <code>webroot/js</code> and it outputs the equivalent transpiled files to <code>webroot/js/babel</code>.</p>
  
  <p>I don't understand how to fix this error. Is this some issue with my config file or is additional setup needed?</p>
  
  <p>I've read the documentation on Babel Config Files at <a href="https://babeljs.io/docs/en/config-files" rel="nofollow noreferrer">https://babeljs.io/docs/en/config-files</a> and found this incredibly convoluted. My goal is to have a configuration file per project, which is why I opted for <code>babel.config.json</code></p>
  
  <p>npm version is 6.13.4, node version is 12.16.1.</p>