title: Getting `Cannot find module '.next\server\pages-manifest.json'` error when trying to add `babel.config.js` in nextjs app
body: <p>I was trying to set up testing for my existing next app. We installed <code>jest</code>, <code>babel-jest</code> <code>@babel/preset-env</code>, <code>@babel/preset-react</code> and, <code>react-test-renderer</code> and then created <code>babel.config.js</code>. When I remove this file, everything works fine.</p>
  <p>As soon as I add the <code>babel.config.js</code> file, I get this error</p>
  <pre><code>Cannot find module '.next\server\pages-manifest.json'
  </code></pre>
  <p>The content of <code>babel.config.js</code> file is</p>
  <pre><code>module.exports = {
    presets: ['@babel/preset-env', '@babel/preset-react'],
  };
  </code></pre>