<h1 dir="auto">NPM run dev throws an error</h1>
<h2 dir="auto">Example name</h2>
<p dir="auto"><strong>with-apollo-and-redux</strong></p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">According to <a href="https://github.com/zeit/next.js/tree/canary/examples/with-apollo-and-redux">this example repo</a>, after using <code class="notranslate">npx</code> and <code class="notranslate">npm install</code>, cant run <code class="notranslate">npm run dev</code> and it throws this error:<br>
<code class="notranslate">[ error ] ./node_modules/next/dist/client/dev/amp-dev.js Error: [BABEL] ...\with-apollo-and-redux-app\node_modules\next\dist\client\dev\amp-dev.js: Cannot find module './src/data'</code></p>
<p dir="auto"><code class="notranslate"> Require stack: ...\with-apollo-and-redux-app\node_modules\core-js-compat\helpers.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\core-js-compat\get-modules-list-for-target-version.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\@babel\preset-env\lib\index.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\build\babel\preset.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\build\webpack\loaders\next-babel-loader.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\loader-runner\lib\loadLoader.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\loader-runner\lib\LoaderRunner.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\webpack\lib\NormalModule.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\webpack\lib\NormalModuleFactory.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\webpack\lib\Compiler.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\webpack\lib\webpack.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\server\hot-reloader.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\server\next-dev-server.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\server\next.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\server\lib\start-server.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\cli\next-dev.js</code><br>
<code class="notranslate">...\with-apollo-and-redux-app\node_modules\next\dist\bin\next</code></p>
<p dir="auto">But in next@9.1.3 there is no issue and its working well.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>Run <code class="notranslate">npx create-next-app --example with-apollo-and-redux with-apollo-and-redux-app</code></li>
<li>Run <code class="notranslate">cd with-apollo-and-redux-app</code></li>
<li>Run <code class="notranslate">npm install</code></li>
<li>Run <code class="notranslate">npm run dev</code></li>
<li>The error shown in command prompt</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">npm dev running on <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> ....</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows 10</li>
<li>Version of Next.js: 9.1.4</li>
</ul>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I have installed version <code class="notranslate">9.1.4</code> of <code class="notranslate">next</code> and now my Docker images don't build anymore! I am getting the following error.</p>
<p dir="auto">However when I run the <code class="notranslate">next build</code> command from my own terminal it works fine so it is only happening for the Docker setup.</p>
<h2 dir="auto">Error</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
&gt; frontend@1.0.0 build /usr/src/app
&gt; next build

Creating an optimized production build...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry


Failed to compile.

./node_modules/next/dist/client/next.js
Error: Cannot find module './src/data'
Require stack:
- /usr/src/app/node_modules/core-js-compat/helpers.js
- /usr/src/app/node_modules/core-js-compat/get-modules-list-for-target-version.js
- /usr/src/app/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /usr/src/app/node_modules/@babel/preset-env/lib/index.js
- /usr/src/app/node_modules/@babel/core/lib/config/files/plugins.js
- /usr/src/app/node_modules/@babel/core/lib/config/files/index.js
- /usr/src/app/node_modules/@babel/core/lib/index.js
- /usr/src/app/node_modules/babel-loader/lib/index.js
- /usr/src/app/node_modules/next/dist/build/webpack/loaders/next-babel-loader.js
- /usr/src/app/node_modules/loader-runner/lib/loadLoader.js
- /usr/src/app/node_modules/loader-runner/lib/LoaderRunner.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/NormalModule.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/NormalModuleFactory.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/Compiler.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/webpack.js
- /usr/src/app/node_modules/next/dist/build/compiler.js
- /usr/src/app/node_modules/next/dist/build/index.js
- /usr/src/app/node_modules/next/dist/cli/next-build.js
- /usr/src/app/node_modules/next/dist/bin/next

&gt; Build error occurred
Error: &gt; Build failed because of webpack errors
    at build (/usr/src/app/node_modules/next/dist/build/index.js:9:900)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend@1.0.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-12-02T19_02_50_506Z-debug.log
ERROR: Service 'frontend' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1
"><pre class="notranslate"><code class="notranslate">...
&gt; frontend@1.0.0 build /usr/src/app
&gt; next build

Creating an optimized production build...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry


Failed to compile.

./node_modules/next/dist/client/next.js
Error: Cannot find module './src/data'
Require stack:
- /usr/src/app/node_modules/core-js-compat/helpers.js
- /usr/src/app/node_modules/core-js-compat/get-modules-list-for-target-version.js
- /usr/src/app/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /usr/src/app/node_modules/@babel/preset-env/lib/index.js
- /usr/src/app/node_modules/@babel/core/lib/config/files/plugins.js
- /usr/src/app/node_modules/@babel/core/lib/config/files/index.js
- /usr/src/app/node_modules/@babel/core/lib/index.js
- /usr/src/app/node_modules/babel-loader/lib/index.js
- /usr/src/app/node_modules/next/dist/build/webpack/loaders/next-babel-loader.js
- /usr/src/app/node_modules/loader-runner/lib/loadLoader.js
- /usr/src/app/node_modules/loader-runner/lib/LoaderRunner.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/NormalModule.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/NormalModuleFactory.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/Compiler.js
- /usr/src/app/node_modules/next/node_modules/webpack/lib/webpack.js
- /usr/src/app/node_modules/next/dist/build/compiler.js
- /usr/src/app/node_modules/next/dist/build/index.js
- /usr/src/app/node_modules/next/dist/cli/next-build.js
- /usr/src/app/node_modules/next/dist/bin/next

&gt; Build error occurred
Error: &gt; Build failed because of webpack errors
    at build (/usr/src/app/node_modules/next/dist/build/index.js:9:900)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend@1.0.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-12-02T19_02_50_506Z-debug.log
ERROR: Service 'frontend' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1

</code></pre></div>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows 10 Home</li>
<li>Version of Next.js: 9.1.4</li>
</ul>