title: Error Couldn't find a `pages` directory. Please create one under the project root"
body: <p>Previously my project setup was</p>
  
  <pre><code>public
  .next
  src
     pages
     components
     assets
  next.config.js
  </code></pre>
  
  <p>This was working fine but I changed the structure to following</p>
  
  <pre><code>public
  src
     client
      next.config.js
      jsconfig.json
      pages
      components
      assets
     server
      index.js
  </code></pre>
  
  <p>now this one is not working. I am getting error <code>Couldn't find a</code>pages<code>directory. Please create one under the project root</code></p>
  
  <p>Here is my updated next.config.js</p>
  
  <pre><code>const withPlugins = require("next-compose-plugins");
  const optimizedImages = require("next-optimized-images");
  const withPWA = require("next-pwa");
  
  module.exports = withPlugins(
      [optimizedImages],
      [
        withPWA({
          pwa: {
            dest: "public",
          },
        }),
      ],
      {
        distDir: '../../dist/client',
      }
  );
  </code></pre>
  
  <p>for absolute import(import Button from 'components/Button')</p>
  
  <p>jsconfig.json</p>
  
  <pre><code>{
      "compilerOptions": {
        "baseUrl": "client/"
      }
    }
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>"scripts": {
      "dev:client": "nextjs src/client",
      "dev:server": "node src/server --out-dir dist/server --source-maps --watch",
      "dev": "dotenv -e .env.development yarn dev:client &amp; yarn dev:server",
      "build": "yarn build:client &amp;&amp; yarn build:server",
      "build:client": "dotenv -e .env.production next build src/client",
      "build:server": "node src/server --out-dir dist/server --source-maps",
      "build:staging": "yarn build:staging:client &amp;&amp; yarn build:server",
      "build:staging:client": "dotenv -e .env.staging next build src/client",
      "start": "next start",
    },
  </code></pre>
  
  <p>.babelrc</p>
  
  <pre><code>{
  
      "plugins": [
        [
          "styled-components",
          {
            "ssr": true,
            "displayName": true,
            "preprocess": false
          }
        ]
      ],
      "presets": [
        "next/babel"
      ]
    }
  </code></pre>